unicode-display_width 3.1.4 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/unicode/display_width/constants.rb +1 -1
- data/lib/unicode/display_width/emoji_support.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c14109c1e795b4a3704c22d98253b3283a630d9fe3d1d0c04710d718673ca5b
|
4
|
+
data.tar.gz: 744619a90fb70a43988c0635ea5f237eee5c3ff3de2d879b55378d2ea3b1ebad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c93aaaec7313fa62ccd8db2ee4de5fab5a757c5cea5e211305da0b55c80ba4d8523db42f100a2d1957d6c3b5a072ff49ecbcce618a02c313d62123ca324492d
|
7
|
+
data.tar.gz: d9c8e89ec9c5602a22205d5c17fe761ae2570b86566ebc6f840706a6ee11976dffb8c2dcf04549abfef0d8d6723297b8ef74249c3f95b862622f198f9cba6564
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Unicode::DisplayWidth [![[version]](https://badge.fury.io/rb/unicode-display_width.svg)](https://badge.fury.io/rb/unicode-display_width) [<img src="https://github.com/janlelis/unicode-display_width/workflows/Test/badge.svg" />](https://github.com/janlelis/unicode-display_width/actions?query=workflow%3ATest)
|
2
2
|
|
3
|
-
Determines the monospace display width of a string in Ruby, which is useful for all kinds of terminal-based applications. The implementation is based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt), the [Emoji specfication](https://www.unicode.org/reports/tr51/) and other data, 100% in Ruby. It does not rely on the OS vendor ([wcwidth
|
3
|
+
Determines the monospace display width of a string in Ruby, which is useful for all kinds of terminal-based applications. The implementation is based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt), the [Emoji specfication](https://www.unicode.org/reports/tr51/) and other data, 100% in Ruby. It does not rely on the OS vendor ([wcwidth](https://github.com/janlelis/wcswidth-ruby)) to provide an up-to-date method for measuring string width in terminals.
|
4
4
|
|
5
5
|
Unicode version: **16.0.0** (September 2024)
|
6
6
|
|
@@ -108,8 +108,8 @@ Emoji Type | Width / Comment
|
|
108
108
|
Basic/Single Emoji character without Variation Selector | No special handling
|
109
109
|
Basic/Single Emoji character with VS15 (Text) | No special handling
|
110
110
|
Basic/Single Emoji character with VS16 (Emoji) | 2 or East Asian Width (see table below)
|
111
|
-
Single Emoji character with Skin Tone Modifier | 2
|
112
|
-
Skin Tone Modifier used in isolation or with invalid base | 2 if Emoji mode is
|
111
|
+
Single Emoji character with Skin Tone Modifier | 2 unless Emoji mode is `:none` or `vs16`
|
112
|
+
Skin Tone Modifier used in isolation or with invalid base | 2 if Emoji mode is `:rgi` / `:rgi_at`
|
113
113
|
Emoji Sequence | 2 if Emoji belongs to configured Emoji set (see table below)
|
114
114
|
|
115
115
|
#### Emoji Modes
|
@@ -1,5 +1,4 @@
|
|
1
|
-
#
|
2
|
-
# RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ # windows
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
3
|
module Unicode
|
5
4
|
class DisplayWidth
|
@@ -13,6 +12,10 @@ module Unicode
|
|
13
12
|
# Please note: Many terminals do not set any ENV vars,
|
14
13
|
# maybe CSI queries can help?
|
15
14
|
def self.recommended
|
15
|
+
@recommended ||= _recommended
|
16
|
+
end
|
17
|
+
|
18
|
+
def self._recommended
|
16
19
|
if ENV["CI"]
|
17
20
|
return :rqi
|
18
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-display_width
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unicode-emoji
|