]> Git Repo - qemu.git/commit - docs/conf.py
sphinx: add qmp_lexer
authorJohn Snow <[email protected]>
Wed, 10 Jul 2019 19:08:06 +0000 (15:08 -0400)
committerJohn Snow <[email protected]>
Wed, 10 Jul 2019 19:08:06 +0000 (15:08 -0400)
commitcd231e13bdcb8d686b014bef940c7d19c6f1e769
tree80d259ae02f5cc7eb000a3623fc0e53dced536aa
parent575e6226287072bd0d6eb85d9712d280eb29c392
sphinx: add qmp_lexer

Sphinx, through Pygments, does not like annotated json examples very
much. In some versions of Sphinx (1.7), it will render the non-json
portions of code blocks in red, but in newer versions (2.0) it will
throw an exception and not highlight the block at all. Though we can
suppress this warning, it doesn't bring back highlighting on non-strict
json blocks.

We can alleviate this by creating a custom lexer for QMP examples that
allows us to properly highlight these examples in a robust way, keeping
our directionality and elision notations.

Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: John Snow <[email protected]>
Reported-by: Aarushi Mehta <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: 20190603214653[email protected]
Signed-off-by: John Snow <[email protected]>
docs/conf.py
docs/sphinx/qmp_lexer.py [new file with mode: 0644]
This page took 0.023968 seconds and 4 git commands to generate.