Page MenuHomePhabricator

Syntax highlighting tags needed
Closed, DeclinedPublic

Description

Author: will.pittenger1+wikibugzilla

Description:
Sometimes when I am sharing how to code something, it would help if I had a tag that would highlight syntax of that code. <syntax-wiki> might work like the <nowiki> tag. However, it would cause HTML entity codes to be ignored and most wiki syntax would get color codes. I am NOT talking about while editing. wikEd does a fine job there. Rather, I want the result to get the highlighted text.

Other possible tags: <syntax-php>, <syntax-html>, <syntax-xhtml>, <syntax-js>, <syntax-css>, (from here as extensions?) <syntax-blogger>, <syntax-cplus>, <syntax-csharp>, etc.


Version: 1.14.x
Severity: enhancement

Details

Reference
bz16268

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport set Reference to bz16268.
bzimport added a subscriber: Unknown Object (MLST).

We have numerous syntax highlighting extensions. On Wikimedia, look at the <code> tag.

http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi is the extension that Wikimedia uses.

It allows for a variety of syntax highlighting languages, like <source lang="php"> and <source lang="javascript">.

It also has an optional line count feature.

will.pittenger1+wikibugzilla wrote:

I am not aware that <code> lets you control which language is used. <source>? Maybe. But I wasn't aware that Wikipedia had it. Does someone know if Wikia does?