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;
8282const V_END : u32 = V_BASE + V_COUNT - 1 ;
8383const T_END : u32 = T_BASE + T_COUNT - 1 ;
8484
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+
8589pub ( crate ) fn is_hangul_syllable ( c : char ) -> bool {
8690 ( c as u32 ) >= S_BASE && ( c as u32 ) < ( S_BASE + S_COUNT )
8791}
@@ -127,7 +131,7 @@ fn compose_hangul(a: char, b: char) -> Option<char> {
127131 Some ( unsafe { char:: from_u32_unchecked ( s) } )
128132 } ,
129133 // 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 => {
131135 Some ( unsafe { char:: from_u32_unchecked ( a + ( b - T_BASE ) ) } )
132136 } ,
133137 _ => None ,
You can’t perform that action at this time.
0 commit comments