Skip to main content
Second iteration. [<https://en.wikipedia.org/wiki/Markdown>]
Source Link

Therefore, ID'ing a snippet as regex is really saying "identify this snippet as the defined identifier for ". This happens to be lang-default, which is really a shortcut to tell the highlighter to "guess" what the correct highlight should be, which in this specific case, becomes markdownMarkdown.

Popping open the console to take a look at the first snippet here will still show class="lang-regex s-code-block hljs", even though it's getting highlighted as markdownMarkdown. I believe this is due to how highlight.js works. It appears it never actually changes the identifier class name itself, but rather injects the child syntax classes underneath it in regardless.

Therefore, ID'ing a snippet as regex is really saying "identify this snippet as the defined identifier for ". This happens to be lang-default, which is really a shortcut to tell the highlighter to "guess" what the correct highlight should be, which in this specific case, becomes markdown.

Popping open the console to take a look at the first snippet here will still show class="lang-regex s-code-block hljs", even though it's getting highlighted as markdown. I believe this is due to how highlight.js works. It appears it never actually changes the identifier class name itself, but rather injects the child syntax classes underneath it in regardless.

Therefore, ID'ing a snippet as regex is really saying "identify this snippet as the defined identifier for ". This happens to be lang-default, which is really a shortcut to tell the highlighter to "guess" what the correct highlight should be, which in this specific case, becomes Markdown.

Popping open the console to take a look at the first snippet here will still show class="lang-regex s-code-block hljs", even though it's getting highlighted as Markdown. I believe this is due to how highlight.js works. It appears it never actually changes the identifier class name itself, but rather injects the child syntax classes underneath it in regardless.

(While we are at it.) Expanded, etc.
Source Link

I searched around, but I couldn't find any previous posts referencing RegExregular expressions. 
RegEx isRegular expressions are stated to be currently supported, but it is not in the list of languages supported by highlight.js (it was supported by Prettify).

There are some weird effects when highlighting complex expressions, ege.g., from this answer:

It sometimes italicizes the characters between asterisks *, and other times fails to highlight character lists inside square brackets, [].

If it's not supported by highlight.js, where is this highlighting scheme even coming from?See update Is RegExAre regular expressions included in the FAQ list by mistake1? I notice that the default highlighter for the tag on SO is lang-default rather than lang-regex.

So I've done a little digging, and it appears what's really going on here is that the regexregular expression in this post is getting auto-recognized as Markdown, even when specified as regex.

Popping open the console to take a look at the first snippet here will still show class="lang-regex s-code-block hljs", even though it's getting highlighted as markdown. I believe this is due to how highlight.js works, it. It appears it never actually changes the identifier class name itself, but rather injects the child syntax classes underneath it in regardless.

I searched around, but couldn't find any previous posts referencing RegEx.
RegEx is stated to be currently supported, but it is not in the list of languages supported by highlight.js (it was supported by Prettify).

There are some weird effects when highlighting complex expressions, eg. from this answer:

It sometimes italicizes the characters between asterisks *, and other times fails to highlight character lists inside square brackets [].

If it's not supported by highlight.js, where is this highlighting scheme even coming from?See update Is RegEx included in the FAQ list by mistake1? I notice that the default highlighter for the tag on SO is lang-default rather than lang-regex.

So I've done a little digging, and it appears what's really going on here is that the regex in this post is getting auto-recognized as Markdown, even when specified as regex.

Popping open the console to take a look at the first snippet here will still show class="lang-regex s-code-block hljs", even though it's getting highlighted as markdown. I believe this is due to how highlight.js works, it appears it never actually changes the identifier class name itself, but rather injects the child syntax classes underneath it in regardless.

I searched around, but I couldn't find any previous posts referencing regular expressions. 
Regular expressions are stated to be currently supported, but it is not in the list of languages supported by highlight.js (it was supported by Prettify).

There are some weird effects when highlighting complex expressions, e.g., from this answer:

It sometimes italicizes the characters between asterisks *, and other times fails to highlight character lists inside square brackets, [].

If it's not supported by highlight.js, where is this highlighting scheme even coming from?See update Are regular expressions included in the FAQ list by mistake1? I notice that the default highlighter for the tag on SO is lang-default rather than lang-regex.

So I've done a little digging, and it appears what's really going on here is that the regular expression in this post is getting auto-recognized as Markdown, even when specified as regex.

Popping open the console to take a look at the first snippet here will still show class="lang-regex s-code-block hljs", even though it's getting highlighted as markdown. I believe this is due to how highlight.js works. It appears it never actually changes the identifier class name itself, but rather injects the child syntax classes underneath it in regardless.

Remove unintentional language id change
Source Link
zcoop98
  • 11.1k
  • 3
  • 28
  • 62
Add information from digging around, replace bug tag with status-bydesign tag
Source Link
zcoop98
  • 11.1k
  • 3
  • 28
  • 62
Loading
Add bug tag
Source Link
zcoop98
  • 11.1k
  • 3
  • 28
  • 62
Loading
Failing to fails
Source Link
zcoop98
  • 11.1k
  • 3
  • 28
  • 62
Loading
Source Link
zcoop98
  • 11.1k
  • 3
  • 28
  • 62
Loading