Skip to content

Commit

Permalink
Support Unicode 15.1.0 (#13812)
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil authored Oct 18, 2023
1 parent 7d969a4 commit a7f7520
Show file tree
Hide file tree
Showing 5 changed files with 661 additions and 72 deletions.
5 changes: 4 additions & 1 deletion scripts/generate_grapheme_break_specs.cr
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ File.open(path, "w") do |file|

format, _, comment = line.partition('#')

# TODO: implement grapheme boundary rule GB9c in UAX29
pending = comment.includes?("[9.3]")

graphemes = [] of String | Char
string = String.build do |io|
grapheme = String::Builder.new
Expand All @@ -61,7 +64,7 @@ File.open(path, "w") do |file|
graphemes << string_or_char(grapheme.to_s)
end

file.puts " it_iterates_graphemes #{string.dump}, [#{graphemes.join(", ", &.dump)}] # #{comment}"
file.puts " #{%(pending "GB9c" { ) if pending} it_iterates_graphemes #{string.dump}, [#{graphemes.join(", ", &.dump)}] #{" }" if pending} # #{comment}"
end
file.puts "end"
end
Expand Down
Loading

0 comments on commit a7f7520

Please sign in to comment.