What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

I wrote an answer on StackOverflow with some PowerShell code examples, but there's no syntax highlighting. There are currently 16,396 (as of 2014-05-07) 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 1,244 (as of 2013-07-10) 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
1  
Last updated Aug 25 '11: list of supported languages. –  Arjan Feb 14 '13 at 19:51
1  
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
1  
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
3  
This should really be a feature request, it would dramatically improve readability on powershell questions –  Mgetz Jul 10 '13 at 15:51
3  
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 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
7  
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 at 21:20

You must log in to answer this question.

Browse other questions tagged .