-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unmatched \end{environment} in \newcommand #3101
Comments
Well IJ does the same thing if you have an extra |
I know that this is perfectly valid LaTeX, but I'm not yet convinced that we should allow this. We can allow this in the parser, just like we do with e.g. @hippalectryon-0 could you give a use case for this, why you think this is good LaTeX style? In particular, why are you not using |
Our use case was a modifier that inserted an object in an existing table: \newcommand{\tableMod}[0]{
\end{multicols}
\insertedObject
\begin{multicols}{2}
} |
That makes sense, thanks. I will see what we can do |
Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
PyCharm 2023.1.2
Operating System
Ubuntu 22
TeXiFy IDEA version
0.7.30
What I did (steps to reproduce)
When creating a command that closes a block without opening it, the inspection raises an error (which in itself is understandable, as a warning at least), but this messes up the inspection of the blocks after the defined command.
Minimal example to reproduce the problem
In this example, the error is raised in the first command, and as a result subsequent commands fail to recognize their arguments
Expected behavior
It's natural that a warning is raised in the command, as it's unusual that a command closes a block without opening it. However, it shouldn't mess up the inspection of subsequent commands.
The text was updated successfully, but these errors were encountered: