File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1862,20 +1862,25 @@ impl<'i> Parser<'i> {
18621862 if ch. is_whitespace ( ) || ch == ',' || ch == ')' {
18631863 // Stop at whitespace, comma, or closing parameter boundary
18641864 break ;
1865- } else if ch. is_ascii_alphabetic ( ) || ch == '°' || ch == '/' || ch == 'μ' {
1865+ } else if ch. is_ascii_alphabetic ( )
1866+ || ch == '°'
1867+ || ch == '/'
1868+ || ch == 'μ'
1869+ || "⁰¹²³⁴⁵⁶⁷⁸⁹" . contains ( ch)
1870+ {
18661871 // Valid character
18671872 valid_end = byte_offset + ch. len_utf8 ( ) ;
18681873 } else {
18691874 // Invalid character found - point directly at it
18701875 return Err ( ParsingError :: InvalidQuantitySymbol (
18711876 self . offset + byte_offset,
1872- 0 ,
1877+ ch . len_utf8 ( ) ,
18731878 ) ) ;
18741879 }
18751880 }
18761881
18771882 if valid_end == 0 {
1878- return Err ( ParsingError :: InvalidQuantitySymbol ( self . offset , 0 ) ) ;
1883+ return Err ( ParsingError :: InvalidQuantitySymbol ( self . offset , 1 ) ) ;
18791884 }
18801885
18811886 let symbol = & self . source [ ..valid_end] ;
You can’t perform that action at this time.
0 commit comments