According to the editing help:
You can use either one of the supported prettify language codes, like lang-cpp or lang-sql, or you can specify a tag, and the syntax highlighting language associated with this tag will be used:
<!-- language: c# --> public static bool IsAwesome { get { return true; } }
However, in this revision history, <!-- language: python -->
fails, yet <!-- language: lang-py -->
works. python is clearly a valid tag, so I'd expect both to work
This also would explain why questions tagged python do not automatically use python syntax highlighting
lang-py
, so this behaviour is expected. Now, I don't know why python isn't associated with thelang-py
highlighter, so that might be unintentional. – Tim Stone Aug 16 '13 at 14:17lang-py
? – Tobias Kienzler Aug 19 '13 at 6:58lang-py
"? – Tobias Kienzler Aug 19 '13 at 8:59django
,flask
,zope
,plone
,web.py
, andwsgi
perhaps. – Martijn Pieters Aug 19 '13 at 9:00lang-py
language highlighter applied by default. – Martijn Pieters Aug 19 '13 at 9:24