mitex-rs / mitex

LaTeX support for Typst, powered by Rust and WASM. https://mitex-rs.github.io/mitex/
https://mitex-rs.github.io/mitex/tools/underleaf.html
Apache License 2.0
240 stars 8 forks source link

fix: parse bracket/paren group only if as argument #132

Closed Myriad-Dreamin closed 4 months ago

Myriad-Dreamin commented 4 months ago

Fix #130. #130 should be closed since this PR fix the first point of #130 and the second point of #130 is duplicated.

This is the case to fix:

https://github.com/mitex-rs/mitex/blob/d75f54bf4c265d369d5c445edfb5e99bab94b3fc/crates/mitex-parser/tests/ast/formula.rs#L34-L42

All bracket/paren are viewed as normal text if they are not matched as an argument of some command.