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

enh(parser) simplify nohighlight #2374

Merged
merged 11 commits into from Feb 6, 2020

Conversation

joshgoebel
Copy link
Member

No description provided.

- Now only `no-highlight` and `nohighlight` skip a block entirely
- `plain` will do nothing
- `text` is now an alias for `plaintext`

Closes highlightjs#2363.
@joshgoebel joshgoebel added enhancement An enhancement or new feature parser labels Jan 31, 2020
@joshgoebel
Copy link
Member Author

@egor Any ideas on betting naming for languagePrefixRe? And should we perhaps remove the need to include the word at the end? (hence it truly being prefix) or should we leave it super flexible?

I decided to make both configurable while I was in there since it was easy and it's come up in conversation before.

@joshgoebel
Copy link
Member Author

joshgoebel commented Jan 31, 2020

I hadn't considered uses like (from the removed tests):

<pre><code class="text-content javascript">var x = 'foo';</code></pre>
<pre><code class="clipboard-text javascript">var x = 'foo';</code></pre>

But think it's still safe to consider them deprecated for the brutal consistency of "nohighlight". And if anyone is seriously affected they can just use the configuration option.

@joshgoebel joshgoebel added this to the 10.0 milestone Jan 31, 2020
@joshgoebel joshgoebel changed the title simplify nohighlight enh(parser) simplify nohighlight Feb 2, 2020
docs/api.rst Outdated Show resolved Hide resolved
docs/api.rst Outdated Show resolved Hide resolved
@joshgoebel joshgoebel merged commit 3bb179c into highlightjs:master Feb 6, 2020
taufik-nurrohman pushed a commit to taufik-nurrohman/highlight.js that referenced this pull request Feb 18, 2020
* (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.
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

Successfully merging this pull request may close these issues.

None yet

3 participants