Topic on Extension talk:SyntaxHighlight

Syntax Highlight ABAP-Code

10
Stra2senBahn (talkcontribs)
Dinoguy1000 (talkcontribs)
Stra2senBahn (talkcontribs)

Thank you,

i know about this ABAP lexer. But I don't know how to use it with SyntaxHighlight. I don't know how to download it (on the listet page there it no download-link), I do't know how to install this lexer and so on.

Greetings

Meinolf

Dinoguy1000 (talkcontribs)

It should be installed as long as you have this extension installed. To use it you'd use <syntaxhighlight lang="abap">code here</syntaxhighlight>, as can be seen on Wikipedia's ABAP article.

Stra2senBahn (talkcontribs)

Yes, when i use it in this Kind the page get the Category:Pages_with_syntax_highlighting_errors.

And i think ist's a Problem of the Extension, because the ar a Lot of Page with syntax-Highlightling-erros. Look at the link Category:Pages with syntax highlighting errors. eg the lang php or sql doset work also as ABAP.

Greeting

Meinolf

Dinoguy1000 (talkcontribs)

Try twiddling the capitalization, e.g. Abap or ABAP instead of abap. Apparently the extension is case-sensitive, but there doesn't seem to be a 100% comprehensive list of correct values for the lang attribute.

Stra2senBahn (talkcontribs)

Sorry, but this proposal does not solve the problem.

even using <syntaxhighlight> without the parameter lang generates the error category.

greeting

Meinolf

Dinoguy1000 (talkcontribs)

The category is always added if you don't have a lang attribute, since the extension doesn't have a default language, and doesn't have any language auto-detection feature. However, having a lang attribute doesn't guarantee that the categoy won't be added; it is also added if the value of the lang attribute is invalid (though as I said above, there isn't any completely comprehensive list of valid values as far as I'm aware). But, one of the ways the value can be "invalid" is if it isn't the expected capitalization, even though the actual language matching doesn't seem to be case-sensitive in most cases. As long as the actual syntax highlighting works correctly, changing the lang attribute's value to prevent the category from being added isn't terribly important. So, is your code being correctly highlighted when you use <syntaxhighlight lang="abap">?

Stra2senBahn (talkcontribs)

No, the code isn't highlighted! The page, the code looks like using the TAGs <pre>code</pre>

Wen i use <syntaxhighlight lang="abap"> the Page will displayed with the Category:Pages with syntax highlighting errors.

greetings

Meinolf Gerling

Dinoguy1000 (talkcontribs)

Is it being highlighted if you use any other capitalization of abap? If not, I'm afraid I'm out of ideas, beyond maybe making sure your MediaWiki installation and the extension are both the latest version, and double-checking the extension's configuration (both if you're able to, of course).

Reply to "Syntax Highlight ABAP-Code"