Content deleted Content added
→oz syntax highlighting lost: 'sml' is partial fallback. |
→oz syntax highlighting lost: use erlang as oz fallback? |
||
Line 95:
Since the switch from Geshi to Pygments for syntax highlighting ([[phab:T85794]]), support for 'oz' was unfortunately dropped, as can be seen with the plain text formatting on this page and others such as [[Alice (programming language)]]. If you want specialised 'oz' syntax highlight support again, it will need to be added to [http://pygments.org/ Pygments]. Alternatively, if there is another language which has similar syntax, we can add that as a fallback. <span style="font-variant:small-caps">[[User:John Vandenberg|John Vandenberg]] <sup>'''([[User talk:John Vandenberg|chat]])'''</sup></span> 07:00, 18 July 2015 (UTC)
:The 'sml' (Standard ML) lang works reasonably well, except that '%' comment character is not recognised. I've switched a few of the examples to sml, and moved some of the code comments into prose in the process. It should be fairly simple to create an 'oz' language in Pygments by subclassing the 'sml' handler. <span style="font-variant:small-caps">[[User:John Vandenberg|John Vandenberg]] <sup>'''([[User talk:John Vandenberg|chat]])'''</sup></span> 19:50, 18 July 2015 (UTC)
::Hi [[User:Cedar101|Cedar101]], I see you [//en.wikipedia.org/w/index.php?title=Oz_%28programming_language%29&type=revision&diff=672540114&oldid=672034275 switched] the lang to erlang for 11 of the source blocks, but not the remaining 5. Using erlang is definitely the right choice when the source needs a code comment, as erlang also uses % as the comment character. But I am wondering why not change the other five also to lang=erlang. It looks like the highlighting of 'then' and 'else' is lost using erlang, but sml doesnt highlight elseif. If erlang is 'close enough', we could propose a patch to the syntax highlighter so that 'oz' is recognised as a language, and rendered using the 'erlang' lexer. <span style="font-variant:small-caps">[[User:John Vandenberg|John Vandenberg]] <sup>'''([[User talk:John Vandenberg|chat]])'''</sup></span> 00:50, 23 July 2015 (UTC)
|