3

In this answer I added a small Powershell script. In Firefox and Chromium, that code doesn't show syntax highlighting. I'm using latest Firefox and Chromium browsers and don't want to change it.

  • Here is the screenshot in PC:

PC_Chromium

But Stack Exchange Android App can highlight the syntax colors.

  • Here is the screenshot in Android:

Android_SE_App

Thanks to DavidPostill who shares this meta thread link. It says to add <!-- language: lang-coffee --> before PS script. With this tweak, that script shows color in both cases.

  • My question: Why it doesn't show color (without that tweak) in PC but does show in Android?
  • SO does not use it's own code syntax highlighting. SO issues Google Code Prettify. If something is not working it should be reported here likewise Google Code Prettify does not support PowerShell. Since The iOS and Android are more or less community projects, it is very likely they are using something else, to identify code syntax. – Ramhound May 23 '18 at 11:59
  • 1
    Because the mobile applications feature set are different than the desktop client. In other words, the mobile application displays the data in a different way. Which is the reason some community moderation features are not accessible in the mobile application – Ramhound May 23 '18 at 13:23
  • Seems like an interesting bug; maybe ask this on Meta Stack Exchange. – gparyani Jun 1 '18 at 6:09
  • Can you migrate this to Meta SE? – Biswapriyo Jun 1 '18 at 6:12
  • lang-coffee is just a workaround, just like people use lang-dos or lang-vb for batch files. Interesting things is that bash has its own syntax highlighting support but batch and powershell don't – phuclv Jul 8 '18 at 17:24

You must log in to answer this question.

Browse other questions tagged .