|
95 | 95 | exclusions = Set(read_composition_exclusions(r"# \(1\) Script Specifics.*?# Total code points:"s))
|
96 | 96 | excl_version = Set(read_composition_exclusions(r"# \(2\) Post Composition Version precomposed characters.*?# Total code points:"s))
|
97 | 97 |
|
98 |
| -# FIXME: Replicate a bug in the ruby code |
99 |
| -push!(exclusions, 0) |
100 |
| -push!(excl_version, 0) |
101 |
| - |
102 | 98 | #-------------------------------------------------------------------------------
|
103 | 99 | function read_case_folding(filename)
|
104 | 100 | case_folding = Dict{UInt32,Vector{UInt32}}()
|
@@ -396,8 +392,7 @@ function char_table_properties!(sequences, char)
|
396 | 392 | comp_exclusion = code in exclusions || code in excl_version,
|
397 | 393 | ignorable = code in ignorable,
|
398 | 394 | control_boundary = char.category in ("Zl", "Zp", "Cc", "Cf") &&
|
399 |
| - # FIXME: Ruby bug compat - should be `code in (0x200C, 0x200D)` |
400 |
| - !(char.category in (0x200C, 0x200D)), |
| 395 | + !(char.code in (0x200C, 0x200D)), |
401 | 396 | charwidth = derive_char_width(code, char.category),
|
402 | 397 | boundclass = get_grapheme_boundclass(code),
|
403 | 398 | indic_conjunct_break = get_indic_conjunct_break(code),
|
|
407 | 402 | # Many character properties are duplicates. Deduplicate them, constructing a
|
408 | 403 | # per-character array of indicies into the properties array
|
409 | 404 | sequences = UTF16Sequences()
|
410 |
| - |
411 |
| -# FIXME: Hack to force ordering compat with Ruby code |
412 |
| -for c in char_props |
413 |
| - encode_sequence!(sequences, c.decomp_mapping) |
414 |
| - encode_sequence!(sequences, get_case_folding(c.code)) |
415 |
| -end |
416 |
| - |
417 | 405 | char_table_props = [char_table_properties!(sequences, cp) for cp in char_props]
|
418 | 406 |
|
419 | 407 | deduplicated_props = Origin(0)(Vector{eltype(char_table_props)}())
|
|
0 commit comments