All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: docs@lists.yoctoproject.org
Subject: [PATCH 13/16] docs: show the examples the BitBake lexer misreads as text
Date: Tue,  1 Dec 2026 10:22:46 -0500	[thread overview]
Message-ID: <20261201152251.2742634-14-twoerner@gmail.com> (raw)
In-Reply-To: <20261201152251.2742634-1-twoerner@gmail.com>

Pygments' BitBake lexer reports errors in a few valid BitBake examples,
which would fail the build once BitBake is the default highlight
language. Show them as text, each with a comment saying why, so they can
be switched back once the lexer reads them.

AI-Generated: codex/claude-opus 5.5 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 documentation/ref-manual/classes.rst   |  6 +++++-
 documentation/ref-manual/variables.rst | 30 +++++++++++++++++++++-----
 2 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 130cbea321e1..49c48b5e5990 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -679,7 +679,11 @@ See :oe_git:`devicetree.bbclass sources
 for further variables controlling this class.
 
 Here is an excerpt of an example ``recipes-kernel/linux/devicetree-acme.bb``
-recipe inheriting this class::
+recipe inheriting this class:
+
+.. Shown as text: the Pygments BitBake lexer misreads this block.
+
+.. code-block:: text
 
    inherit devicetree
    COMPATIBLE_MACHINE = "^mymachine$"
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 2a14a663bf51..9e956a42f0f0 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -1690,7 +1690,11 @@ system and gives an overview of their function and contents.
       with the current machine.
 
       If one wants to have a recipe only available for some architectures
-      (here ``aarch64`` and ``mips64``), the following can be used::
+      (here ``aarch64`` and ``mips64``), the following can be used:
+
+      .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+      .. code-block:: text
 
          COMPATIBLE_MACHINE = "^$"
          COMPATIBLE_MACHINE:arch64 = "^(aarch64)$"
@@ -1705,7 +1709,11 @@ system and gives an overview of their function and contents.
       The third is for matching all machines whose :term:`MACHINEOVERRIDES`
       contains one override which is exactly ``mips64``.
 
-      The same could be achieved with::
+      The same could be achieved with:
+
+      .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+      .. code-block:: text
 
          COMPATIBLE_MACHINE = "^(aarch64|mips64)$"
 
@@ -9728,7 +9736,11 @@ system and gives an overview of their function and contents.
 
       By default this variable is empty, meaning no files are excluded.
 
-      Example usage::
+      Example usage:
+
+      .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+      .. code-block:: text
 
          SPDX_FILE_EXCLUDE_PATTERNS = "\\.patch$ \\.diff$ /test/ \\.pyc$ \\.o$"
 
@@ -11580,7 +11592,11 @@ system and gives an overview of their function and contents.
       are not conflicting and that they are supported.
 
       The BitBake configuration file (``meta/conf/bitbake.conf``) defines
-      :term:`TUNE_FEATURES` as follows::
+      :term:`TUNE_FEATURES` as follows:
+
+      .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+      .. code-block:: text
 
          TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
 
@@ -12574,7 +12590,11 @@ system and gives an overview of their function and contents.
 
       For recipes with dot-separated versions, inherit the
       :ref:`ref-classes-upstream-stable-release-point` class to generate this
-      variable automatically. For other versioning schemes, set it directly::
+      variable automatically. For other versioning schemes, set it directly:
+
+      .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+      .. code-block:: text
 
          UPSTREAM_STABLE_RELEASE_REGEX = "^10\.2p\d+$"
 
-- 
2.50.0.173.g8b6f19ccfc3a


  parent reply	other threads:[~2026-12-01 15:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 15:22 [PATCH 00/16] docs: highlight code blocks as BitBake by default Trevor Woerner
2026-12-01 15:22 ` [PATCH 01/16] brief-yoctoprojectqs: state the language of the blocks that are not BitBake Trevor Woerner
2026-12-01 15:22 ` [PATCH 02/16] bsp-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 03/16] contributor-guide: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 04/16] dev-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 05/16] kernel-dev: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 06/16] migration-guides: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 07/16] overview-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 08/16] profile-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 09/16] ref-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 10/16] security-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 11/16] test-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 12/16] toaster-manual: " Trevor Woerner
2026-12-01 15:22 ` Trevor Woerner [this message]
2026-12-01 15:22 ` [PATCH 14/16] docs: drop the file-wide highlight directives Trevor Woerner
2026-12-01 15:22 ` [PATCH 15/16] conf.py: default the highlight language to bitbake Trevor Woerner
2026-12-01 15:22 ` [PATCH 16/16] standards: describe how a code block states its language Trevor Woerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201152251.2742634-14-twoerner@gmail.com \
    --to=twoerner@gmail.com \
    --cc=docs@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.