mbox series

[0/7] sphinx: carry lexers for the languages the manuals show

Message ID 20261125154535.3486104-1-twoerner@gmail.com
Headers show
Series sphinx: carry lexers for the languages the manuals show | expand

Message

Trevor Woerner Nov. 25, 2026, 3:45 p.m. UTC
This is the series proposed in [1]: the BitBake lexer first, then the
other lexers, one patch each. The BitBake lexer is patch 1 and can be
applied on its own.

No block uses any of these lexers yet, so the rendered manuals do not
change, with one exception: the console fix in patch 6 changes how
existing console blocks read a line opening with a bare "#", from a root
prompt to program output. Every commit builds clean under -W on its own.

The BitBake lexer takes its patterns from BitBake's own parser, and is
the same lexer proposed to Pygments in [2]. The SCC and wks lexers are
derived the same way, from yocto-kernel-tools and from wic's parser.

The series is based on master-next with two of your pending series
applied, since both also edit the extension list in conf.py:

  - Add support for documentation tags [3]
  - Add a "Library Functions" section to the ref-manual [4]

The tags series needed two trivial conflict resolutions to apply on
master-next, both in the tags it appends to the end of
contributor-guide/submit-changes.rst and ref-manual/kickstart.rst.

[1] https://lore.kernel.org/r/atjXdzebFGmKVjj8@localhost.localdomain
[2] https://github.com/pygments/pygments/pull/3284
[3] https://lore.kernel.org/r/20261028-tags-v1-0-d5ad01019eae@bootlin.com
[4] https://lore.kernel.org/r/20261124-oe-utils-docs-v1-0-5fafbf6cb01c@bootlin.com

Trevor Woerner (7):
  sphinx: carry a BitBake lexer as a local extension
  sphinx: add a lexer for BitBake with placeholders
  sphinx: add a lexer for kernel metadata SCC files
  sphinx: add a lexer for wic kickstart files
  sphinx: add a lexer for pydevshell sessions
  sphinx: read a bare "#" in a console block as output
  sphinx: mark placeholders in console and plain-text examples

 documentation/conf.py                         |   9 +-
 .../sphinx-static/theme_overrides.css         |  20 +
 documentation/sphinx/bitbake-lexer.py         | 432 ++++++++++++++++++
 documentation/sphinx/bitbake-placeholder.py   | 145 ++++++
 documentation/sphinx/console-lexer.py         |  53 +++
 documentation/sphinx/placeholder-lexers.py    | 134 ++++++
 documentation/sphinx/pydevshell-lexer.py      |  48 ++
 documentation/sphinx/scc-lexer.py             | 116 +++++
 documentation/sphinx/wks-lexer.py             |  60 +++
 9 files changed, 1016 insertions(+), 1 deletion(-)
 create mode 100644 documentation/sphinx/bitbake-lexer.py
 create mode 100644 documentation/sphinx/bitbake-placeholder.py
 create mode 100644 documentation/sphinx/console-lexer.py
 create mode 100644 documentation/sphinx/placeholder-lexers.py
 create mode 100644 documentation/sphinx/pydevshell-lexer.py
 create mode 100644 documentation/sphinx/scc-lexer.py
 create mode 100644 documentation/sphinx/wks-lexer.py