unicode-sequence_name 1.15.0 → 1.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/data/sequence_name.marshal.gz +0 -0
- data/lib/unicode/sequence_name/constants.rb +1 -1
- data/lib/unicode/sequence_name.rb +14 -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: 9027ebad3f5176ac6e6e554460da72a6fc2edcefa99e73027df557693f197d3a
|
4
|
+
data.tar.gz: 34ea77e121ff2ed7c88e94da43bfe78ad313b52fba516255459de01ba7027d5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 537a1b631841da656b8bd8a1445791383271f6f7a2fff62c9d413e0db1780d8af1d67f98c7793ec797999985ed6d2b694741c0e101ec14899a37f5e010864fe9
|
7
|
+
data.tar.gz: f4f0943434c71e329bfa4b7c9551804ab46dc1547a629bde186c95c0aeb2087661232bc74d067dac50a03ce6d12411d1753b582c664dd76d3b547fc89d1f12d5
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
Binary file
|
@@ -6,7 +6,7 @@ module Unicode
|
|
6
6
|
codepoints = get_codepoint_values(string)
|
7
7
|
require_relative "sequence_name/index" unless defined? ::Unicode::SequenceName::INDEX
|
8
8
|
if res = INDEX[:SEQUENCES][codepoints] || INDEX[:SEQUENCES_NOT_QUALIFIED][codepoints]
|
9
|
-
res
|
9
|
+
insert_words(res)
|
10
10
|
else
|
11
11
|
nil
|
12
12
|
end
|
@@ -17,7 +17,7 @@ module Unicode
|
|
17
17
|
codepoints = get_codepoint_values(string)
|
18
18
|
require_relative "sequence_name/index" unless defined? ::Unicode::SequenceName::INDEX
|
19
19
|
if res = INDEX[:SEQUENCES][codepoints]
|
20
|
-
res
|
20
|
+
insert_words(res)
|
21
21
|
else
|
22
22
|
nil
|
23
23
|
end
|
@@ -36,8 +36,20 @@ module Unicode
|
|
36
36
|
raise(ArgumentError, "Unicode::SequenceName.of must be given a valid string")
|
37
37
|
end
|
38
38
|
|
39
|
+
def self.insert_words(raw_name)
|
40
|
+
raw_name.chars.map{ |char|
|
41
|
+
codepoint = char.ord
|
42
|
+
if codepoint < INDEX[:REPLACE_BASE]
|
43
|
+
char
|
44
|
+
else
|
45
|
+
"#{INDEX[:COMMON_WORDS][codepoint - INDEX[:REPLACE_BASE]]} "
|
46
|
+
end
|
47
|
+
}.join.chomp
|
48
|
+
end
|
49
|
+
|
39
50
|
class << self
|
40
51
|
private :get_codepoint_values
|
52
|
+
private :insert_words
|
41
53
|
end
|
42
54
|
end
|
43
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-sequence_name
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: "[Unicode 16.0.0][Emoji 16.0] Returns the name of a Unicode code point
|
14
14
|
sequence, if one exists"
|