Topic on Extension talk:Scribunto

Syntax highlighting not working

4
SANtosito (talkcontribs)

I'm trying to make syntax highlighting working in modules but apparently sth is missing. I have installed WikiEditor, SyntaxHighlight, CodeEditor and have done everything as said in manual. All installed extension are working , just seems it dosen't work with Scribunto, so I guess the problem must be sth else

wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

wfLoadExtension( 'CodeEditor' );

wfLoadExtension( 'Scribunto' );

$wgScribuntoDefaultEngine = 'luastandalone';

$wgScribuntoEngineConf['luastandalone']['key'] = 'value';

$wgScribuntoUseGeSHi = true;

$wgScribuntoUseCodeEditor = true;

http://escforumwiki.com/index.php?title=Module:Documentation

WikimeSteve (talkcontribs)

I do not see a solution and outcome here. I am having the same issue. We do not have CodeEditor installed though. Is that required?

Syntax highlighting is working on all other pages as expected. With the following should we see module syntax highlighting or do we need anything else?

$wgScribuntoDefaultEngine = 'luastandalone';

$wgScribuntoEngineConf['luastandalone']['key'] = 'value';

$wgScribuntoUseGeSHi = true;

wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

wfLoadExtension( 'Scribunto' );


Update: I just copied the Lua code from a Module window. Pasted it into a blank page and surrounded it with <syntaxhighlight lang="Lua">. When I click show demo it was all nice and colorful and matches how it looks on the same module on Wikipedia. So our SyntaxHighlight seems fine. The Module view just does not show it on our Wiki.

Cavila (talkcontribs)

Five years on, has anyone found a solution to this problem of Scribunto seemingly failing to call CodeEditor and WikiEditor in the text editor? (I'm not referring to the SyntaxHighlight extension, which is a different topic). Or have any clues where to look for potential problems?

MW 1.39.6 | WikiEditor 0.5.3 | CodeEditor (no version number) | Scribunto (no version number, luastandalone), with Lua 5.1.5 and $wgScribuntoUseCodeEditor = true. I have tried playing with the order of the settings, to no avail. CodeEditor is working fine on JavaScript and CSS pages and so is WikiEditor.

Cavila (talkcontribs)

Got it. An older extension I was using interfered with Scribunto because it neglected to abort the hook (it returned true). I removed it and CodeEditor works again.

Reply to "Syntax highlighting not working"