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

It would be nice if no-highlight took precedence #4160

Open
ndw opened this issue Nov 6, 2024 · 0 comments
Open

It would be nice if no-highlight took precedence #4160

ndw opened this issue Nov 6, 2024 · 0 comments
Labels
enhancement An enhancement or new feature parser

Comments

@ndw
Copy link

ndw commented Nov 6, 2024

I learned about no-highlight in #842

This is a fairly minor issue, but in the interest of orthogonality, it would be nice if no-highlight took precedence over even a supported language. If, for example, Python is included as a supported language:

<pre class="no-highlight language-python">...

Syntax highlights the block using the Python highlighter.

I think something like:

if (block.classList.contains("no-highlight")) {
   return "no-highlight";
}

at the start of blockLanguage on line 95 would do it.

@ndw ndw added enhancement An enhancement or new feature parser labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature parser
Projects
None yet
Development

No branches or pull requests

1 participant