Skip to content

Commit 0e3e3d6

Browse files
committed
Simplify README
1 parent 4447249 commit 0e3e3d6

File tree

2 files changed

+20
-27
lines changed

2 files changed

+20
-27
lines changed

CHANGELOG.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,26 @@ More performance improvements:
4040

4141
## 2.0.0
4242

43-
- Release 2.0.0
44-
- Supports Ruby 3.0
43+
Add Support for Ruby 3.0
44+
45+
### Breaking Changes
46+
47+
Some features of this library were marked deprecated for a long time and have been removed with Version 2.0:
48+
49+
- Aliases of display\_width (…\_size, …\_length) have been removed
50+
- Auto-loading of string core extension has been removed:
51+
52+
If you are relying on the `String#display_width` string extension to be automatically loaded (old behavior), please load it explicitly now:
53+
54+
```ruby
55+
require "unicode/display_width/string_ext"
56+
```
57+
58+
You could also change your `Gemfile` line to achieve this:
59+
60+
```ruby
61+
gem "unicode-display_width", require: "unicode/display_width/string_ext"
62+
```
4563

4664
## 2.0.0.pre2
4765

README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,12 @@ Determines the monospace display width of a string in Ruby. Useful for all kinds
44

55
Unicode version: **16.0.0** (September 2024)
66

7-
Supported Rubies: **3.3**, **3.2**, **3.1**, **3.0**
8-
9-
Old Rubies which might still work: **2.7**, **2.6**, **2.5**, **2.4**, **2.3**
10-
11-
For even older Rubies, use version 2.3.0 of this gem: **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
12-
137
## Version 2.4.2 — Performance Updates
148

159
**If you use this gem, you should really upgrade to 2.4.2 or newer. It's often 100x faster, sometimes even 1000x and more!**
1610

1711
This is possible because the gem now detects if you use very basic (and common) characters, like ASCII characters. Furthermore, the charachter width lookup code has been optimized, so even when full-width characters are involved, the gem is much faster now.
1812

19-
## Version 2.0 — Breaking Changes
20-
21-
Some features of this library were marked deprecated for a long time and have been removed with Version 2.0:
22-
23-
- Aliases of display_width (…\_size, …\_length) have been removed
24-
- Auto-loading of string core extension has been removed:
25-
26-
If you are relying on the `String#display_width` string extension to be automatically loaded (old behavior), please load it explicitly now:
27-
28-
```ruby
29-
require "unicode/display_width/string_ext"
30-
```
31-
32-
You could also change your `Gemfile` line to achieve this:
33-
34-
```ruby
35-
gem "unicode-display_width", require: "unicode/display_width/string_ext"
36-
```
37-
3813
## Introduction to Character Widths
3914

4015
Guessing the correct space a character will consume on terminals is not easy. There is no single standard. Most implementations combine data from [East Asian Width](https://www.unicode.org/reports/tr11/), some [General Categories](https://en.wikipedia.org/wiki/Unicode_character_property#General_Category), and hand-picked adjustments.

0 commit comments

Comments
 (0)