lib/unibits/symbolify.rb in unibits-2.2.0 vs lib/unibits/symbolify.rb in unibits-2.3.0
- old
+ new
@@ -76,15 +76,12 @@
0x9D => "OSC",
0x9E => "PM",
0x9F => "APC",
}
- INTERESTING_CODEPOINTS = {
- 0x180B => "FVS1",
- 0x180C => "FVS2",
- 0x180D => "FVS3",
-
+ BIDI_CONTROL_NAMES = {
+ 0x061C => "ALM",
0x200E => "LRM",
0x200F => "RLM",
0x202A => "LRE",
0x202B => "RLE",
0x202C => "PDF",
@@ -92,12 +89,16 @@
0x202E => "RLO",
0x2066 => "LRI",
0x2067 => "RLI",
0x2068 => "FSI",
0x2069 => "PDI",
+ }
- 0x034F => "CGJ",
+ INTERESTING_CODEPOINTS = {
+ 0x180B => "FVS1",
+ 0x180C => "FVS2",
+ 0x180D => "FVS3",
0xFE00 => "VS1",
0xFE01 => "VS2",
0xFE02 => "VS3",
0xFE03 => "VS4",
@@ -408,17 +409,19 @@
char = CONTROL_DELETE_SYMBOL
elsif char_info.c0?
char = CONTROL_C0_SYMBOLS[ord]
elsif char_info.c1?
char = CONTROL_C1_NAMES[ord]
- elsif char_info.blank?
- char = "]" + char + "["
- elsif ord > 917536 && ord < 917631
- char = "TAG " + char.tr(TAGS, ASCII_CHARS)
+ elsif char_info.bidi_control?
+ char = BIDI_CONTROL_NAMES[ord]
elsif char_info.category == "Mn"
char = "◌" + char
elsif char_info.category == "Me"
char = " " + char
+ elsif char_info.blank?
+ char = "]" + char + "["
+ elsif ord > 917536 && ord < 917631
+ char = "TAG " + char.tr(TAGS, ASCII_CHARS)
else
char = INTERESTING_CODEPOINTS[char.ord] || char
end
char