GNOME Bugzilla – Bug 615582
add syntax highlighting to the code in the documentation
Last modified: 2016-11-29 12:06:42 UTC
In the documentation for gstreamer: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html it would be great to have the code excerpts with syntax highlighting. It can very easily be done using source-highlight, code2html or similar tools.
Do you intend to make a patch?
Not really, I had a quick look at the code for the site and couldn't figure out where the code snippets appear. But for example, if the code appeared in static web pages as "<!-- code2html add -l c /home/weasel/foobar.c -->" like in: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Foobar</title> </head> <body> <h1>Foobar</h1> Hello everybody! <!-- code2html add -l c /home/weasel/foobar.c --> That's it. </body> </html> then by running "code2html -p thisfile.html" it would substitute the comment line with the actual colored code. (see http://www.palfrader.org/code2html/patching.html )
This should be mostly done now, see e.g. https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/events.html