2

recently, the code blocks holding powershell code are showing bash instead of powershell.

even going into the post and changing the language from bash to powershell seems to have no lasting effect.

so ... what happened? and how to fix it?

7
  • See meta.stackoverflow.com/questions/362286/… Commented Nov 11 at 13:53
  • The language noted is the prettifying language used, rather than the actual language. There isn't a PowerShell language enabled in the prettifier that Stack Overflow uses, so the ability to have it show "PowerShell" isn't possible without that language being added. At the moment [powershell] uses the Bash language prettification, hence why the blocks show as "Bash" even if they aren't. PowerShell is supported by Highlight.js, so it just needs to be actually enabled. Commented Nov 11 at 13:59
  • @ThomA -- thank you ... it is really annoying, but knowing why the eff-up exists help defuse that. Commented Nov 11 at 14:17
  • I am a little confused though. The language used in this meta post seems to suggest you noticed a recent change in behavior. But this can't actually be true. So... how did we get here? Are you just making things up or did something really change, like the site now defaulting to bash rather than something else? Commented Nov 11 at 14:39
  • 7
    @Gimby I think this is the recent change to code blocks that actually shows the prettifying language being used (along with the Copy button). Previously code blocks didn't tell you what they were using. Commented Nov 11 at 14:47
  • @Gimby -- as greg-449 mentioned, it is the result of a recent change in the behavior of code blocks. for_me, [since i usually look only at powershell stuff] they used to show powershell ... but now show bash and the copy button. Commented Nov 14 at 17:01
  • highlight-js does have both lang-dos and lang-powershell, but neither is supported on SO/SE. Commented 2 days ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.