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
Consider: Fix "plain" and "text" to come in line with "plaintext" #2363
Comments
I agree that this matter is very confusing. V10 looks like a right moment to change things, so I'm OK with it. |
If you INSIST I wouldn't argue, but to me "plain" doesn't really have a lot of meaning on it's own separate from "text"... so I'd wait and see if it proves to be necessary rather than add it preemptively. |
I have no strong opinion on that. Let it be |
- Now only `no-highlight` and `nohighlight` skip a block entirely - `plain` will do nothing - `text` is now an alias for `plaintext` Closes highlightjs#2363.
* (chore) make `noHighlightRe` and `languagePrefixRe` configurable (languageDetectRe now) * (chore) simply 'nohighlight' regex - Now only `no-highlight` and `nohighlight` skip a block entirely - `plain` will do nothing - `text` is now an alias for `plaintext` Closes highlightjs#2363.
Currently the
noHighlightRe
regex is:This means "plain" or "text" will result in skipping a block COMPLETELY, not applying ANY styling, not even the default "hljs" (codeblock) fg/bg styling. We now also have "plaintext"... which applies no code-level styling BUT will still result in a HLJS styled code block. IE, it's highlighted, but as "plaintext" vs not being highlighted at all.
To make this clearer I'd like to change the regex to match only "no highlight" or "no-highlight".
plain
will simply disappear andtext
could move to become an alias forplaintext
.Since this could be (in some ways) considered a breaking change I'd like to include it in version 10 and also make the regex configurable... that way anyone desiring the "old" behavior could achieve it by modifying the regex - and since that's evaluated first, boom they get the old behavior.
I think this would simplify things and remove some ambiguity. I've wanted to do this for a while but this issue prompted me to post: #2360
@egor-rogov Thoughts?
The text was updated successfully, but these errors were encountered: