You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a problem with this package, it is to do with how C is highlighted. Normal highlighting works fine (like your second example), it just uses a list of rules to follow. When it reaches the command \end{minted}, it reverts back to Latex.
However, when using something like the braces, it does some bracket-specific stuff and then refers back to these "base" highlighting rules (seen here). This is all well and good for pure C/C++, but when embedded like yours the base language is not C — it's Latex.
This can actually be seen by trying Latex syntax inside, which will highlight correctly.
Therefore, I'll close this issue and suggest looking elsewhere for more help.
For example:
(This package does everything it can to ensure going into and out of a programming language works, but this is a technical issue we can't address; once you enter C syntax highlighting, all bugs are out of our control.)
I'm find bug of highlighting c++ code with brackets. All statements in brackets have one color.
with brackets
without brackets
The text was updated successfully, but these errors were encountered: