Skip to content
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

Syntax highlighting broken with minted environment. #152

Closed
GoPavel opened this issue Oct 8, 2017 · 1 comment
Closed

Syntax highlighting broken with minted environment. #152

GoPavel opened this issue Oct 8, 2017 · 1 comment

Comments

@GoPavel
Copy link

GoPavel commented Oct 8, 2017

I'm find bug of highlighting c++ code with brackets. All statements in brackets have one color.

  1. with brackets
    default

  2. without brackets
    default

@Aerijo
Copy link
Collaborator

Aerijo commented Oct 9, 2017

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.)

@Aerijo Aerijo closed this as completed Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants