Peter Krauss
Peter Krauss

Reputation: 13920

How to enable the SyntaxHighlight extension after installed?

I have a fresh Mediawiki (v1.33) installed into fresh UBUNTU 18 LTS... The ''SyntaxHighlight'' extension is not working, the effect is like a code into <pre> tags.

At mediawiki.org/list there are no clues. I used the syntax_highlighting checkbox during Mediawiki installation, and I can see it at Especial:Version page as "SyntaxHighlight 2.0", so, it is installed... But is not working.


NOTES AND TESTS

Notes.

Tests.

  1. Usage tests of mediawiki.org/Extension:SyntaxHighlight, the Python example.

    1.1. With tag <syntaxhighlight>. Result: no highlight, same as <pre>.

    1.2. With tag <source>. Result: no highlight, same as <pre>.

  2. PHP example, fragment from wikipedia.org/PHP Syntax.

    2.1. With tag <syntaxhighlight>. Result: no highlight, same as <pre>.

    2.2. With tag <source>. Result: no highlight, same as <pre>.

The code fragments used in the tests:

def quickSort(arr):
    less = []
    pivotList = []
    more = []
    if len(arr) <= 1:
        return arr
    else:
        pass
<title>PHP "Hello, World!" program</title>
<?php echo '<p>Hello World</p>'; ?>

NOTE2: IT IS NOT A DUPLICATE

This question is similar but not same as this other one: here is about the basic "Hello World" of the extension, for any lang, and the other is about an specific lang installation. We need to solver first here, them, solve the other.

Upvotes: 1

Views: 1437

Answers (1)

LCW
LCW

Reputation: 11

That is because syntaxhighlight in >MediaWiki 1.31 requires Python. [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Installation][1] Besides I am looking for how to install python in a2hosted.

Upvotes: 1

Related Questions