Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 4
    This isn't really an answer, just a corollary.
    – tripleee
    Commented Oct 11, 2023 at 11:43
  • 5
    Also, please don't post the same content to multiple questions.
    – tripleee
    Commented Oct 11, 2023 at 11:46
  • 4
    @zcoop98 Your addition here is based on an inaccurate assumption that it's a bug and introduces a red herring into the discussion. The version of highlight.js doesn't matter for this. The issue is that Stack Exchange doesn't include PowerShell syntax in the languages available in the page. Thus, all attempts to try to use PowerShell syntax highlighting on Stack Exchange won't pull in an actual highlighting definition. So, specifying powershell syntax highlighting does nothing (it might be useful, eventually, when at some point in the future SE includes the PowerShell syntax definition).
    – Makyen
    Commented Oct 12, 2023 at 15:05
  • Apologies @Makyen , you're totally right. I thought that PS highlighting was included; I see now that it's not in the list.
    – zcoop98
    Commented Oct 12, 2023 at 16:20
  • It may not make a difference for the syntax highlighting in this case, but Get-date is not the official spelling of the cmdlet (though it is case insensitive). For instance, for Java, it makes a difference: If the normal Java conventions are not followed (e.g., for variable names), the syntax highlighting will not be correct. Or in other words, the current syntax highlighter in some cases (or all cases?) expects the platform conventions to be followed Commented Oct 13, 2023 at 23:31
  • @This_is_NOT_a_forum corrected Commented Oct 20, 2023 at 13:35