After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792661 - use pygments to do syntax highlighing
use pygments to do syntax highlighing
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.25
Other Linux
: Normal enhancement
: 1.28
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-18 20:31 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2018-03-23 21:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Sauer (gstreamer, gtkdoc dev) 2018-01-18 20:31:15 UTC
gtk-doc uses external programs to generated syntax highlighted code snippets. Instead of shelling out to highligh/source-highlight or vim, we should see if we can use the pygments python library. This can be faster and be more portable.


This is the code in question:
https://git.gnome.org/browse/gtk-doc/tree/gtkdoc/fixxref.py#n223

and here are samples for pygments
http://pygments.org/docs/quickstart/
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2018-03-23 21:23:55 UTC
Done in git for mkhtml2

commit c778283dcb9ba11d93a1c3281b9567e97b3f8770
Author: Stefan Sauer <ensonic@users.sf.net>
Date:   Sun Mar 18 19:33:20 2018 +0100

    mkhtml2: first stab add syntax hightlighing