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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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