Last modified: 2008-11-07 08:16:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18268, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16268 - Syntax highlighting tags needed
Syntax highlighting tags needed
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.14.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-07 05:24 UTC by Will Pittenger
Modified: 2008-11-07 08:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Will Pittenger 2008-11-07 05:24:56 UTC
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.
Comment 1 Andrew Garrett 2008-11-07 05:26:25 UTC
We have numerous syntax highlighting extensions. On Wikimedia, look at the <code> tag.
Comment 2 MZMcBride 2008-11-07 05:29:24 UTC
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.
Comment 3 Will Pittenger 2008-11-07 08:16:10 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links