Code syntax highlighting: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 7: | Zeile 7: | ||
markdown: | markdown: | ||
<nowiki> | <nowiki> | ||
<source lang="c" line start="2" highlight="4-6"> | <source lang="c" line start="2" highlight="4-6"> | ||
// comment | // comment | ||
Zeile 16: | Zeile 16: | ||
} | } | ||
</source> | </source> | ||
</nowiki> | </nowiki> | ||
<code> | <code> |
Version vom 13. April 2020, 21:35 Uhr
SyntaxHighlighter
This extension is installed and works! https://www.mediawiki.org/wiki/Extension:SyntaxHighlighter#Installation
Example
markdown:
<source lang="c" line start="2" highlight="4-6"> // comment var setArray = function(elems) { this.length = 0; push.apply(this, elems); return this; } </source>
// comment
var setArray = function(elems) {
this.length = 0;
push.apply(this, elems);
return this;
}
result:
// comment
var setArray = function(elems) {
this.length = 0;
push.apply(this, elems);
return this;
}
SyntaxHighlight
Unfortunately have not been able to get this extension to work: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Installation
including the bellow options in the LocalSettings.php file generates an errors: wfLoadExtension( 'SyntaxHighlight_GeSHi' ); require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";