Skip to main content
Added additional info
Source Link
JW0914
  • 8.6k
  • 9
  • 8

Registry [.reg] code used to display correctly, and still does on some questions/answers, however on others it doesn't, and there's no obvious reason why. Ever since Superuser switched what's used for syntax highlighting, very few Windows syntaxes [powershell/ps1, cmd/bat, reg, vbs] work correctly and they do not work the same across all questions/answers on Superuser, regardless of the Windows syntax used, which is baffling.

 

  • When it was first announced on 2020.09.08 highlight.js was being switched to from Prettify, I posted on 2020.10.06 the powershell and bat/cmd syntax highlighting were broken, with it coming back as status-bydesign
    • highlight.js's SUPPORTED_LANGUAGES.md supports powershell/ps1/ps, bat/cmd/dos, and while it does not list reg as a supported language, it does get syntax highlighted semi-correctly at random on Superuser

  • Per the SE supported languages list, none of these are supported, which brings two questions to the forefront:
    • Why is the syntax highlighting applying randomly to some questions/answers, and doing so semi-correctly when it does work?
    • Why are the two primary languages of Windows not on the list of SE supported languages when highlight.js supports them?
      • This in turn creates a third question because when highlight.js supports them, this seems like a conscious exclusion, which is baffling in and of itself:
        Do SE/SU developers have a bias against Windows, when Windows makes up an equal share of content on SU?

Registry [.reg] code used to display correctly, and still does on some questions/answers, however on others it doesn't, and there's no obvious reason why. Ever since Superuser switched what's used for syntax highlighting, very few Windows syntaxes [powershell/ps1, cmd/bat, reg, vbs] work correctly and they do not work the same across all questions/answers on Superuser, regardless of the Windows syntax used, which is baffling.

 

Registry [.reg] code used to display correctly, and still does on some questions/answers, however on others it doesn't, and there's no obvious reason why. Ever since Superuser switched what's used for syntax highlighting, very few Windows syntaxes [powershell/ps1, cmd/bat, reg, vbs] work correctly and they do not work the same across all questions/answers on Superuser, regardless of the Windows syntax used, which is baffling.

  • When it was first announced on 2020.09.08 highlight.js was being switched to from Prettify, I posted on 2020.10.06 the powershell and bat/cmd syntax highlighting were broken, with it coming back as status-bydesign
    • highlight.js's SUPPORTED_LANGUAGES.md supports powershell/ps1/ps, bat/cmd/dos, and while it does not list reg as a supported language, it does get syntax highlighted semi-correctly at random on Superuser

  • Per the SE supported languages list, none of these are supported, which brings two questions to the forefront:
    • Why is the syntax highlighting applying randomly to some questions/answers, and doing so semi-correctly when it does work?
    • Why are the two primary languages of Windows not on the list of SE supported languages when highlight.js supports them?
      • This in turn creates a third question because when highlight.js supports them, this seems like a conscious exclusion, which is baffling in and of itself:
        Do SE/SU developers have a bias against Windows, when Windows makes up an equal share of content on SU?

edited tags
Link
DavidPostill Mod
  • 160.2k
  • 1
  • 38
  • 59
Modified content layout
Source Link
JW0914
  • 8.6k
  • 9
  • 8

Inconsistent syntax highlighting for Registry [.reg]reg and powershell code

Updated 2024.06.25:

What is going on with this site's syntax highlighting?

  • This is an edit I just did a few min ago on the left, compared to the one on the right:
    WTF


This was posted on Meta SE on 2024.06.26 after being told to do so to get an SE developer's attention (this has only received 64 views in 4.5months prior to the post on Meta SE), and apparently folks on Meta SE don't like that, with it receiving nothing but down-votes. This is as clear of a bug as one could possibly get, having existed for YEARS, ever since Superuser switched to its new syntax highlighting system (this was not an issue before then).

Registry [.reg] code used to display correctly, and still does on some questions/answers, however on others it doesn't, and there's no obvious reason why. Ever since Superuser switched what's used for syntax highlighting, very few Windows syntaxes [powershell/ps1, cmd/bat, reg, vbs] work correctly and they do not work the same across all questions/answers on Superuser, regardless of the Windows syntax used, which is baffling.

It would be nice for Superuser to embrace Windows syntax highlighting since equal amounts of content on Superuser is Windows related, as syntax primarily used on non-Windows languages always seems to work and work consistently across questions/answers.

Semi-Correctly Displayed

Issue from this morning with PowerShell syntax:

  1. <!-- language-all: lang-powershell -->2024.02.15: incorrectly applies syntax highlighting to first code box, applies semi-correctly to every additional code box
    How can I fix this error in the DISM log file?
    Incorrect5

  2. Issue with ```powershellpowershell: incorrectly applies syntax highlighting
    How can I fix this error in the DISM log file?
    Incorrect6

    Doesn't apply syntax highlighting at all:
    How can I fix this error in the DISM log file?
    Incorrect7

  3. No language specified:
    How can I fix this error in the DISM log file?
    Incorrect8

    1. <!-- language-all: lang-powershell -->: incorrectly applies syntax highlighting to first code box, applies semi-correctly to every additional code box
      How can I fix this error in the DISM log file?
      Incorrect5

    2. ```powershell: incorrectly applies syntax highlighting
      How can I fix this error in the DISM log file?
      Incorrect6

      Doesn't apply syntax highlighting at all:
      How can I fix this error in the DISM log file?
      Incorrect7

    3. No language specified:
      How can I fix this error in the DISM log file?
      Incorrect8

The only way I was able to get semi-correct syntax highlighting was by using ```bash:
How can I fix this error in the DISM log file?
Incorrect9 


  1. 2024.06.25: Issue with reg syntax:
    1. <!-- language-all: lang-reg -->: Edit I just did on the left, compared to the right:
      WTF

Inconsistent syntax highlighting for Registry [.reg] code

Updated 2024.06.25:

What is going on with this site's syntax highlighting?

  • This is an edit I just did a few min ago on the left, compared to the one on the right:
    WTF


Registry [.reg] code used to display correctly, and still does on some questions/answers, however on others it doesn't, and there's no obvious reason why. Ever since Superuser switched what's used for syntax highlighting, very few Windows syntaxes work correctly and they do not work the same across all questions/answers on Superuser, regardless of the Windows syntax used, which is baffling.

It would be nice for Superuser to embrace Windows syntax highlighting since equal amounts of content on Superuser is Windows related, as syntax primarily used on non-Windows languages always seems to work and work consistently across questions/answers.

Correctly Displayed

Issue from this morning with PowerShell syntax:

  1. <!-- language-all: lang-powershell -->: incorrectly applies syntax highlighting to first code box, applies semi-correctly to every additional code box
    How can I fix this error in the DISM log file?
    Incorrect5

  2. ```powershell: incorrectly applies syntax highlighting
    How can I fix this error in the DISM log file?
    Incorrect6

    Doesn't apply syntax highlighting at all:
    How can I fix this error in the DISM log file?
    Incorrect7

  3. No language specified:
    How can I fix this error in the DISM log file?
    Incorrect8

The only way I was able to get semi-correct syntax highlighting was by using ```bash:
How can I fix this error in the DISM log file?
Incorrect9

Inconsistent syntax highlighting for reg and powershell code

This was posted on Meta SE on 2024.06.26 after being told to do so to get an SE developer's attention (this has only received 64 views in 4.5months prior to the post on Meta SE), and apparently folks on Meta SE don't like that, with it receiving nothing but down-votes. This is as clear of a bug as one could possibly get, having existed for YEARS, ever since Superuser switched to its new syntax highlighting system (this was not an issue before then).

Registry [.reg] code used to display correctly, and still does on some questions/answers, however on others it doesn't, and there's no obvious reason why. Ever since Superuser switched what's used for syntax highlighting, very few Windows syntaxes [powershell/ps1, cmd/bat, reg, vbs] work correctly and they do not work the same across all questions/answers on Superuser, regardless of the Windows syntax used, which is baffling.

Semi-Correctly Displayed

  1. 2024.02.15: Issue with powershell syntax:
    1. <!-- language-all: lang-powershell -->: incorrectly applies syntax highlighting to first code box, applies semi-correctly to every additional code box
      How can I fix this error in the DISM log file?
      Incorrect5

    2. ```powershell: incorrectly applies syntax highlighting
      How can I fix this error in the DISM log file?
      Incorrect6

      Doesn't apply syntax highlighting at all:
      How can I fix this error in the DISM log file?
      Incorrect7

    3. No language specified:
      How can I fix this error in the DISM log file?
      Incorrect8

The only way I was able to get semi-correct syntax highlighting was by using ```bash:
How can I fix this error in the DISM log file?
Incorrect9 


  1. 2024.06.25: Issue with reg syntax:
    1. <!-- language-all: lang-reg -->: Edit I just did on the left, compared to the right:
      WTF

added 67 characters in body; edited title; edited tags
Source Link
JW0914
  • 8.6k
  • 9
  • 8
Loading
Added new info
Source Link
JW0914
  • 8.6k
  • 9
  • 8
Loading
Added additional info
Source Link
JW0914
  • 8.6k
  • 9
  • 8
Loading
Removed incorrect #3
Source Link
JW0914
  • 8.6k
  • 9
  • 8
Loading
Typo correction
Source Link
JW0914
  • 8.6k
  • 9
  • 8
Loading
Source Link
JW0914
  • 8.6k
  • 9
  • 8
Loading