Skip to content

Commit e62c0ec

Browse files
author
Charlotte Thomas
committed
replace superscript 1 by nothing
1 parent 030d4d2 commit e62c0ec

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/parsing/ast.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,20 @@ impl Parameters {
226226
}
227227
_ => v,
228228
};
229-
format!("{}{}{}{}", first_attach, separator, z, l.replace("⁻", ""))
229+
let e = l.replace("⁻", "");
230+
format!(
231+
"{}{}{}{}",
232+
first_attach,
233+
separator,
234+
z,
235+
if l == "¹" {
236+
""
237+
} else if l == "⁻¹" {
238+
""
239+
} else {
240+
e.as_str()
241+
}
242+
)
230243
}
231244
}
232245

0 commit comments

Comments
 (0)