Panic: unbalanced environment stack or state stack
Hi, with some random typing, i found `push_mathml` crashes with inputting a macro like `\bar` (which takes some arguments) and a subscript
``` rust
mod tests {
#[test]
fn should_not_panic() {
use pulldown_latex::{Parser, RenderConfig, Storage};
let storage = Storage::new();
let parser = Parser::new("\\bar_a", &storage);
let config = RenderConfig::default();
let mut math_output = String::new();
let res = pulldown_latex::push_mathml(&mut math_output, parser, config);
assert!(res.is_ok());
}
}
```
This code sinppet panics:
```
thread 'cmark::latex::tests::should_not_panic' panicked at /.../pulldown-latex-0.7.1/src/mathml.rs:913:13:
unbalanced environment stack or state stack
```
And it's reproducible on the [demo page](https://carloskiki.github.io/pulldown-latex/).
关闭于 2026-05-21 0 条评论