Skip to content

Commit

Permalink
fix(spec): add escape symbols for plus, minus and percent (#161)
Browse files Browse the repository at this point in the history
* fix(spec): add escape symbols for plus, minus and percent

* fix: fix test
  • Loading branch information
OrangeX4 committed Apr 25, 2024
1 parent 5db08ce commit 6abf031
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/mitex/tests/cvt/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn test_convert_space() {

#[test]
fn test_convert_escape() {
assert_snapshot!(convert_math(r#"$\|x\|| \& \# \% \$ y$"#).unwrap(), @"|| x || | amp hash percent dollar y "
assert_snapshot!(convert_math(r#"$\|x\|| \& \# \% \$ y$"#).unwrap(), @"|| x || | amp hash % dollar y "
);
assert_snapshot!(convert_math(r#"$a*b * c$"#).unwrap(), @r###"a \*b \* c "###
);
Expand Down
4 changes: 3 additions & 1 deletion packages/mitex/specs/latex/standard.typ
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@
"|": define-sym("||"),
"&": define-sym("amp"),
"#": define-sym("hash"),
"%": define-sym("percent"),
"%": define-sym("%"),
"-": define-sym("-"),
"+": define-sym("+"),
"$": define-sym("dollar"),
"{": define-sym("\\{"),
"}": define-sym("\\}"),
Expand Down

0 comments on commit 6abf031

Please sign in to comment.