We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5773d44 commit 6c52fc8Copy full SHA for 6c52fc8
src/canonicalize.rs
@@ -1389,9 +1389,13 @@ impl CanonicalizeContext {
1389
1390
/// looks for pairs of (letter, pseudoscript) such as x' or p'q' all inside of a single token element
1391
fn split_apart_pseudo_scripts<'a>(mi: Element<'a>) -> Option<Element<'a>> {
1392
+ lazy_static!{
1393
+ static ref IS_DEGREES_C_or_F: Regex = Regex::new(r"[°º][CF]").unwrap();
1394
+ }
1395
+
1396
let text = as_text(mi);
1397
debug!("split_apart_pseudo_scripts: start text=\"{text}\"");
- if !text.chars().any (|c| PSEUDO_SCRIPTS.contains(&c)) {
1398
+ if !text.chars().any(|c| PSEUDO_SCRIPTS.contains(&c)) || IS_DEGREES_C_or_F.is_match(text) {
1399
return None;
1400
}
1401
0 commit comments