[Buildbot-commits] [Buildbot] #2511: A lot of code examples in documentation not highlighted

Buildbot trac trac at buildbot.net
Thu Jun 20 21:15:05 UTC 2013


#2511: A lot of code examples in documentation not highlighted
-------------------+-----------------------
Reporter:  rutsky  |      Owner:
    Type:  defect  |     Status:  new
Priority:  major   |  Milestone:  undecided
 Version:  master  |   Keywords:  docs
-------------------+-----------------------
 There are quite a lot of python code snippets in documentation that are
 not highlighted (for example [1], near "Triggering Schedulers" header).

 Most of code snippets specified without exact language specification and
 we rely on Sphinx autodetection feature. This mostly works, but if Sphinx
 fails to parse code snippet it silently renders it unhighlighted.

 As I see there are two types of incorrectly unhighlighted code:
 1. Code with syntax errors (such as not closed brackets) --- it should be
 fixed.
 2. Pythonic pseudocode with invalid indentation or ellipsis --- for such
 code snippets code block language should be specified explicitly.

 It would be nice to automate checking if some code failed to highlight,
 but as I see right now there are no such option in Sphinx (I made feature
 request in Sphinx to warn about not highlighted blocks [2]).

 For now I made quick hack of Sphinx and made list of code blocks which are
 not highlighted [3] (IMO mostly there are unmatched brackets in code).

 [1] http://docs.buildbot.net/latest/manual/cfg-buildsteps.html

 [2] https://bitbucket.org/birkenfeld/sphinx/issue/1201/optionally-warn-
 about-not-highlighted

 [3] http://pastebin.com/giX0pJkW

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2511>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list