Skip to content

Commit

Permalink
Adjust tool/enc-unicode.rb to deal with new location of some emoji files
Browse files Browse the repository at this point in the history
- Change location of file emoji-data.txt
- Change range of files in emoji directory
  ([stz] is for emoji-sequences.txt, emoji-test.txt, and emoji-zwj-sequences.txt)
- Make sure that version of all emoji files is checked against Emoji version
  • Loading branch information
duerst committed Jul 8, 2021
1 parent b6113a3 commit 94fc4b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool/enc-unicode.rb
Expand Up @@ -138,7 +138,7 @@ def parse_scripts(data, categories)
{:fn => 'DerivedCoreProperties.txt', :title => 'Derived Property'},
{:fn => 'Scripts.txt', :title => 'Script'},
{:fn => 'PropList.txt', :title => 'Binary Property'},
{:fn => 'emoji-data.txt', :title => 'Emoji'}
{:fn => 'emoji/emoji-data.txt', :title => 'Emoji'}
]
current = nil
cps = []
Expand Down Expand Up @@ -305,13 +305,13 @@ def constantize_blockname(name)
end

def get_file(name)
File.join(ARGV[name.start_with?("emoji-") ? 1 : 0], name)
File.join(ARGV[name.start_with?("emoji-[stz]") ? 1 : 0], name)
end

def data_foreach(name, &block)
fn = get_file(name)
warn "Reading #{name}"
if /^emoji-/ =~ name
if /^emoji/ =~ name
sep = ""
pat = /^# #{Regexp.quote(File.basename(name))}.*^# Version: ([\d.]+)/m
type = :Emoji
Expand Down

0 comments on commit 94fc4b1

Please sign in to comment.