File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ const L_END: u32 = L_BASE + L_COUNT - 1;
82
82
const V_END : u32 = V_BASE + V_COUNT - 1 ;
83
83
const T_END : u32 = T_BASE + T_COUNT - 1 ;
84
84
85
+ // Composition only occurs for `TPart`s in `U+11A8 ... U+11C2`,
86
+ // i.e. `T_BASE + 1 ... T_END`.
87
+ const T_START : u32 = T_BASE + 1 ;
88
+
85
89
pub ( crate ) fn is_hangul_syllable ( c : char ) -> bool {
86
90
( c as u32 ) >= S_BASE && ( c as u32 ) < ( S_BASE + S_COUNT )
87
91
}
@@ -127,7 +131,7 @@ fn compose_hangul(a: char, b: char) -> Option<char> {
127
131
Some ( unsafe { char:: from_u32_unchecked ( s) } )
128
132
} ,
129
133
// Compose an LV_Syllable and a trailing consonant into an LVT_Syllable
130
- ( S_BASE ... S_END , T_BASE ... T_END ) if ( a - S_BASE ) % T_COUNT == 0 && ( b - T_BASE ) > 0 => {
134
+ ( S_BASE ... S_END , T_START ... T_END ) if ( a - S_BASE ) % T_COUNT == 0 => {
131
135
Some ( unsafe { char:: from_u32_unchecked ( a + ( b - T_BASE ) ) } )
132
136
} ,
133
137
_ => None ,
You can’t perform that action at this time.
0 commit comments