Skip to content

Latex comments are not always properly ignored #2271

@Sjlver

Description

@Sjlver

Latex comments are not always properly ignored like they should be. Consider the following example:

$$
\renewcommand{\foo}{\mathop{\rm foo}}
%\renewcommand{\}{}
$$

Hi $\foo$

Entering this at https://www.mathjax.org/#demo produces this result:

Screenshot 2019-12-19 at 20 47 45

Changing the second line to %\renewcommand{}{} (removing the backslash) works:

image

Note that the line is actually commented out (i.e., starts with %)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions