From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14235.1796306031348838026 for ; Thu, 03 Dec 2026 05:53:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=AI6BJr0l; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id EF62A4E4185F for ; Thu, 3 Dec 2026 13:53:49 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BFA08604ED; Thu, 3 Dec 2026 13:53:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1C58D11EA17DE; Thu, 03 Dec 2026 14:53:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796306025; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=utKvAbE/uVPi8JwCfLzqATM8XSINnun02G30b7ouJVY=; b=AI6BJr0loRf0b8VkFYbKqdAha8E5kwPw7xp99Gr6dJR3szfZeJEEtfJ3iU9rY3REiKa+qf JVHKk9gC2whwaVnFY4Jjsy8QfHrpjB0o5XJZHb+52wWd6hWZFzCxzKK5b8IrbxA0u2bB0E fQKuc8TjTIXy0BL8uxn7gS+hpimS0H7ql47dDlU/iIL29L6WdaoKJJWRfdQa8BNC3g0Mct 49aulC3zMNZm42s35PbEUr8eKiPkjF/gnNHLqlsqvEMa8MoNyvB3c8x7tsysJJyADU+IPj iG0dEuhYm6niWw+OWzKmktlqjeICHYepMpA5O58+7r2mi4d5ijqm1Ub7RB50pg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 03 Dec 2026 14:53:44 +0100 Message-Id: To: , Subject: Re: [docs] [PATCH 16/16] standards: describe how a code block states its language From: "Antonin Godard" References: <20261201152251.2742634-1-twoerner@gmail.com> <20261201152251.2742634-17-twoerner@gmail.com> In-Reply-To: <20261201152251.2742634-17-twoerner@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 03 Dec 2026 13:53:54 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10916 On Tue Dec 1, 2026 at 4:22 PM CET, Trevor Woerner via docs wrote: > The manuals highlight a code block as BitBake unless it says otherwise, > which is a rule a contributor can only discover by reading conf.py. > Write it down, along with the languages the other blocks use and what to > do with a block the BitBake lexer cannot read. > > AI-Generated: codex/claude-opus 5.5 (xhigh) > Signed-off-by: Trevor Woerner > --- > documentation/standards.md | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/documentation/standards.md b/documentation/standards.md > index 152a90923401..2614220ef0e1 100644 > --- a/documentation/standards.md > +++ b/documentation/standards.md > @@ -134,6 +134,28 @@ Note that only "absolute" paths (starting with a '/'= ) are allowed. The root > directory of that path is documentation/, that is, :doc:`/bsp-manual/ind= ex` > points at documentation/bsp-manual/index.rst. > =20 > +### Code blocks > + > +A code block is highlighted as BitBake unless it says otherwise, because > +most of the code in the manuals is BitBake metadata. A block of anything > +else states its language: > + > + .. code-block:: console > + > + $ bitbake core-image-minimal > + > +Use the language the block actually is, not the one it resembles. A > +session with a prompt is `console`, a script without one is `shell`, and > +a listing of paths or program output is `text`. > + > +If the BitBake lexer cannot read a valid BitBake block, show it as `text= ` > +and say why in a comment above it, so it can be switched back once the > +lexer is fixed: > + > + .. Shown as text: the Pygments BitBake lexer misreads this block. > + > + .. code-block:: text > + > ## Adding screenshots > =20 > The preferred format for adding screenshots is Can you add a link to https://pygments.org/docs/lexers and mention that "sh= ort names" should be used with the code-block directive? At the beginning, can you add an example of what a "default" code-block loo= ks like? I assume not everyone knows that this means a code block coming after= a line ending with "::". Thanks, that was quite the series to review! Antonin