Skip to content

Commit

Permalink
fix: fix bug of ItemCurly
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Dec 28, 2023
1 parent 72dcd0d commit 1cace2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/mitex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl Converter {
let mut prev = LaTeXEnv::None;
let mut enter_new_env = false;
// hack for \substack{abc \\ bcd}
if !matches!(self.env, LaTeXEnv::SubStack) {
if matches!(self.mode, LaTeXMode::Math) && !matches!(self.env, LaTeXEnv::SubStack) {
prev = self.enter_env(LaTeXEnv::CurlyGroup);
enter_new_env = true;
}
Expand Down Expand Up @@ -368,6 +368,8 @@ impl Converter {
} else {
f.write_str("+ ")?;
}
} else {
Err("item command outside of itemize or enumerate".to_owned())?;
}
return Ok(());
}
Expand Down

0 comments on commit 1cace2c

Please sign in to comment.