File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,23 @@ impl TranslationTable {
202202 . filter ( |r| r. rule . is_direction ( direction) )
203203 . collect ( ) ;
204204
205+ // FIXME: For some unknown reason the litdigit rule seems to have precedence over the digit
206+ // rule. Since they both want to define digits in the same character_definitions slot we
207+ // need to make sure litdigits rules are handled before digit rules
208+ for rule in rules. iter ( ) . filter ( |r| matches ! ( r. rule, Rule :: Litdigit { .. } ) ) {
209+ match & rule. rule {
210+ Rule :: Litdigit {
211+ character, dots, ..
212+ } => {
213+ let translation =
214+ Translation :: new ( character. to_string ( ) , dots_to_unicode ( dots) , 1 ) ;
215+ character_definitions. insert ( * character, translation) ;
216+ character_attributes. insert ( Attribute :: Digit , * character) ;
217+ }
218+ _ => ( ) ,
219+ }
220+ }
221+
205222 // The compilation is done in two passes: The first pass simply collects all character
206223 // definitions and character attributes, so that they are then known in a second pass, e.g.
207224 // for implicit braille definitions or for the `base` opcode
You can’t perform that action at this time.
0 commit comments