Katex: Comment at end of line within environment causes parse error

Created on 8 Nov 2018  Â·  1Comment  Â·  Source: KaTeX/KaTeX

In version 0.10.0 (no issue in 0.10.0-rc.1), I am getting parse errors when inside an environment I have a comment at the end of a line, followed by a line that starts with a command

\begin{aligned}
  a&=b+c \\ % comment
  \text{d}+e&=f
\end{aligned}

KaTeX parse error: Expected & or \\ or \cr or \end at position 41: …\\ % comment \̲t̲e̲x̲t̲{d}+e&=f \end{a…

bug regression

Most helpful comment

@mmaloon Thanks for reporting this bug!

@ylemkimon I'm guessing this was from one of the parser changes, maybe the raw/url string reader? We should also add some tests to catch such regression in the future.

>All comments

@mmaloon Thanks for reporting this bug!

@ylemkimon I'm guessing this was from one of the parser changes, maybe the raw/url string reader? We should also add some tests to catch such regression in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mpolyak picture mpolyak  Â·  3Comments

sophiebits picture sophiebits  Â·  3Comments

janosh picture janosh  Â·  4Comments

fabiospampinato picture fabiospampinato  Â·  4Comments

mbourne picture mbourne  Â·  3Comments