Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I wrote an answer on StackOverflow with some PowerShell code examples, but there's no syntax highlighting. There are currently 29,611 (as of 2015-12-08) questions tagged on StackOverflow. Please add prettified syntax highlighting to PowerShell questions.

These are the one's I experimented with in my original testing.

<!-- language: lang-ps-->
<!-- language: lang-ps1-->
<!-- language: lang-powershell-->
<!-- language: lang-posh-->

Side note: there are only 5,591 (as of 2015-12-08) questions tagged on StackOverflow, and it is already supported

Close voters, please read my comment below before casting your vote. I believe StackOverflow is maintaining their own version now, so forking the original and adding posh support would NOT solve this feature request.

share|improve this question
Last updated Aug 25 '11: list of supported languages. – Arjan Feb 14 '13 at 19:51
Doesn't seem that there is support for powershell. – nhahtdh Feb 14 '13 at 20:59
You can try putting it through another syntax highlighter like Pygments and copying the HTML. I make no guarantee that the sanitizer will like the HTML that comes out though. – Linuxios Feb 14 '13 at 22:49
hmmm, @Linuxios, I'm not sure that will accomplish what I'm asking. This needs to be implemented on SO... – Chase Florell Feb 14 '13 at 23:33
@nhahtdh, you appear to be right. I wonder how hard the additional implementation would be. – Chase Florell Feb 14 '13 at 23:34
This should really be a feature request, it would dramatically improve readability on powershell questions – Mgetz Jul 10 '13 at 15:51
Not sure I like the cute shorthand like ps by itself - people may think it is PostScript, or PL/SQL, or PostgreSQL, who knows. posh would probably be less ambiguous and not really all that much more painful to write (especially since all the powershell-related tags should trigger that as the default formatting once it is implemented). – Aaron Bertrand Jul 10 '13 at 19:15
never thought of posh, but you're probably right. – Chase Florell Jul 10 '13 at 19:16
trying to write this myself as per my question... lack of documentation on prettify itself is becoming a problem – Mgetz Jul 10 '13 at 19:31
I've done some format testing in the sandbox it would be plausible to use the csh highlighting until such a plugin was developed – Mgetz Jul 10 '13 at 20:25
I believe they're using Google Code Prettify, which isn't native to SE. You could try forking the source and adding support, then asking them to pull it back in. – Asad Saeeduddin Jul 10 '13 at 22:02
You could be right, but I was under the impression that SE forked that long ago and are maintaining their own now. – Chase Florell Jul 10 '13 at 23:08
There is an open issue for Prettify that includes a language file for PowerShell. It’s incomplete but definitely better than no syntax highlighting at all (current situation). Can we reopen the question and get that language file added to the highlighter? – poke Dec 21 '13 at 1:45
@poke I've voted to re-open - the issue tracker says "the only thing I know it has trouble with is delimited comments, which follow the pattern <# comment #>" which sounds a lot better than nothing. – Jack Douglas Dec 21 '14 at 21:20

You must log in to answer this question.

Browse other questions tagged .