Last modified: 2012-09-19 17:00:58 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 T24512, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22512 - A new MediaWiki extension to provide syntax highlighting with pygments
A new MediaWiki extension to provide syntax highlighting with pygments
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Extensions requests (Other open bugs)
unspecified
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://pygments.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-14 05:14 UTC by Mike.lifeguard
Modified: 2012-09-19 17:00 UTC (History)
2 users (show)

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


Attachments

Description Mike.lifeguard 2010-02-14 05:14:06 UTC
Please write a new syntax highlighting extension which uses Pygments instead of GeSHi.

*GeSHi is showing it's age
*Pygments produces nicer highlighting in many cases
*Pygments is actively developed, and ever so much trendier (just look at the purty webpage!)
Comment 1 Max Semenik 2010-02-14 07:52:35 UTC
Pygments is written in Python, while MediaWiki in PHP. A monster that will combine the two pieces, apparently by execing a Python interpreter, is not an option for sites of any reasonable size for performance reasons. How do you suggest to overcome this?
Comment 2 Niklas Laxström 2010-02-14 09:56:23 UTC
(In reply to comment #0)
> *GeSHi is showing it's age
> *Pygments is actively developed, and ever so much trendier (just look at the
> purty webpage!)

What makes you think that? I have quite an opposite impression of Geshi and its development activity.
Comment 3 Mike.lifeguard 2010-02-14 14:31:19 UTC
(In reply to comment #1)
> How do you suggest to overcome this?

I have no idea, I am not writing it. If you think it is a bad idea, then you could just close this.
Comment 4 Shauna 2012-09-19 16:22:51 UTC
(In reply to comment #1)
> Pygments is written in Python, while MediaWiki in PHP. A monster that will
> combine the two pieces, apparently by execing a Python interpreter, is not an
> option for sites of any reasonable size for performance reasons. How do you
> suggest to overcome this?

There's now a bridge that overcomes this issue, called Pygments for PHP ( http://derek.simkowiak.net/pygments-for-php/ ). Given that a Wordpress extension has successfully been made using it, perhaps this is now a viable request?
Comment 5 Niklas Laxström 2012-09-19 17:00:58 UTC
As far as I can see pygmentize() is just launching the python interpreter behind the scenes.(In reply to comment #4)
> (In reply to comment #1)
> > Pygments is written in Python, while MediaWiki in PHP. A monster that will
> > combine the two pieces, apparently by execing a Python interpreter, is not an
> > option for sites of any reasonable size for performance reasons. How do you
> > suggest to overcome this?
> 
> There's now a bridge that overcomes this issue, called Pygments for PHP (
> http://derek.simkowiak.net/pygments-for-php/ ). Given that a Wordpress
> extension has successfully been made using it, perhaps this is now a viable
> request?

That bridge only does what was written above: "execing a Python interpeter".

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


Navigation
Links