Skip to main content
Removed Google Code Prettify, as it's use was discontinued 2020.06.20
Source Link
JW0914
  • 8.6k
  • 9
  • 8

According to this Meta thread, this would appear to be an issue with Google Code Prettify, however syntaxSyntax highlighting for both Powershell and Batch works if it's specified manually in an HTML comment, but not via a code block: 

  • Doesn't Work: (code block)
    • ```bat
      
    • ```powershell
      

  • Works: (HTML comment)
    • <!-- language-all: lang-bat -->
      <!-- language: lang-bat -->
    • <!-- language-all: lang-powershell -->
      <!-- language: lang-powershell -->

Is the latter implemented by Superuser locally and not via Google Code Prettify, else why theWhy is there this disparity?

  • I'm not familiar with how StackExchange sites individually function, but wouldn't it be a lot simpler and efficient, causing less discombobulation, if shell languages were supported the same across all sites that apply tosupporting code block markdown?

    For example, syntax highlighting for both Powershell and Batch are auto-applied on StackOverflow.

According to this Meta thread, this would appear to be an issue with Google Code Prettify, however syntax highlighting for both Powershell and Batch works if it's specified manually:

  • Doesn't Work:
    • ```bat
      
    • ```powershell
      

  • Works:
    • <!-- language-all: lang-bat -->
      <!-- language: lang-bat -->
    • <!-- language-all: lang-powershell -->
      <!-- language: lang-powershell -->

Is the latter implemented by Superuser locally and not via Google Code Prettify, else why the disparity?

  • I'm not familiar with how StackExchange sites individually function, but wouldn't it be a lot simpler if shell languages were supported the same across all sites that apply to code?

    For example, syntax highlighting for both Powershell and Batch are auto-applied on StackOverflow.

Syntax highlighting for both Powershell and Batch works if specified manually in an HTML comment, but not via a code block: 

  • Doesn't Work: (code block)
    • ```bat
      
    • ```powershell
      

  • Works: (HTML comment)
    • <!-- language-all: lang-bat -->
      <!-- language: lang-bat -->
    • <!-- language-all: lang-powershell -->
      <!-- language: lang-powershell -->

Why is there this disparity?

  • I'm not familiar with how StackExchange sites individually function, but wouldn't it be a lot simpler and efficient, causing less discombobulation, if shell languages were supported the same across all sites supporting code block markdown?

    For example, syntax highlighting for both Powershell and Batch are auto-applied on StackOverflow.
Source Link
JW0914
  • 8.6k
  • 9
  • 8

Powershell and Batch syntax highlighting not working logically

According to this Meta thread, this would appear to be an issue with Google Code Prettify, however syntax highlighting for both Powershell and Batch works if it's specified manually:

  • Doesn't Work:
    • ```bat
      
    • ```powershell
      

  • Works:
    • <!-- language-all: lang-bat -->
      <!-- language: lang-bat -->
    • <!-- language-all: lang-powershell -->
      <!-- language: lang-powershell -->

Is the latter implemented by Superuser locally and not via Google Code Prettify, else why the disparity?

  • I'm not familiar with how StackExchange sites individually function, but wouldn't it be a lot simpler if shell languages were supported the same across all sites that apply to code?

    For example, syntax highlighting for both Powershell and Batch are auto-applied on StackOverflow.