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 @@ -1813,7 +1813,10 @@ fn canonicalize_primes(ident: &str) -> Ident {
1813
1813
}
1814
1814
1815
1815
fn place_primes ( ident : & str , count : usize ) -> Ident {
1816
- let mut new: Ident = ident. trim_end_matches ( [ '\'' , '′' , '″' , '‴' ] ) . into ( ) ;
1816
+ let exclams_removed = ident. trim_end_matches ( [ '!' , '‼' ] ) ;
1817
+ let mut new: Ident = exclams_removed
1818
+ . trim_end_matches ( [ '\'' , '′' , '″' , '‴' ] )
1819
+ . into ( ) ;
1817
1820
let num_triple = count / 3 ;
1818
1821
let trailing_num = count % 3 ;
1819
1822
for _ in 0 ..num_triple {
@@ -1825,6 +1828,7 @@ fn place_primes(ident: &str, count: usize) -> Ident {
1825
1828
2 => new. push ( '″' ) ,
1826
1829
_ => unreachable ! ( ) ,
1827
1830
}
1831
+ new. push_str ( & ident[ exclams_removed. len ( ) ..] ) ;
1828
1832
new
1829
1833
}
1830
1834
You can’t perform that action at this time.
0 commit comments