area / language-latex

Syntax highlighting for LaTeX for Atom.
Other
79 stars 47 forks source link

Opening environment inside command definition breaks highlighting #168

Open MrQubo opened 6 years ago

MrQubo commented 6 years ago

Prerequisites

Description

Highlighting gets broken when \begin and \end are used inside command definitions.

Minimum working example

\newcommand{\leqn}{\begin{equation}}
\newcommand{\reqn}{\end{equation}}
Aerijo commented 6 years ago

Seems kind of unavoidable, but I’m thinking a similar solution to the one I suggest in #155. This way, any bad highlighting would (hopefully) be confined to the group.

yudai-nkt commented 6 years ago

Your MWE is not recommended. See the comment section of this question on TeX.SX for example.