diff mbox series

[4/4] recipe-style-guide: Prune unicode from code example

Message ID 20260727163529.30595-4-niko.mauno@iki.fi
State New
Headers show
Series [1/4] ref-manual: Fix occurrences of omitted space with :prepend | expand

Commit Message

niko.mauno@iki.fi July 27, 2026, 4:35 p.m. UTC
From: Niko Mauno <niko.mauno@vaisala.com>

Copy-pasting example segment containing unicode characters causes
breakage like:

  ERROR: ParseError at .../foobar.bb:158: unparsed line: 'RDEPENDS:${PN} = “foo”'

therefore replace the unicode characters in the example with regular
ASCII characters.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
---
 documentation/contributor-guide/recipe-style-guide.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Quentin Schulz July 27, 2026, 5:18 p.m. UTC | #1
Hi Niko,

On 7/27/26 6:35 PM, Niko Mauno via lists.yoctoproject.org wrote:
> [You don't often get email from niko.mauno=iki.fi@lists.yoctoproject.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> From: Niko Mauno <niko.mauno@vaisala.com>
> 
> Copy-pasting example segment containing unicode characters causes
> breakage like:
> 
>    ERROR: ParseError at .../foobar.bb:158: unparsed line: 'RDEPENDS:${PN} = “foo”'
> 
> therefore replace the unicode characters in the example with regular
> ASCII characters.
> 

There's one additional location where we use those special characters, 
in documentation/contributor-guide/identify-component.rst, would you 
mind sending a patch for this as well please?

I think it'd be nice to add a check in pre-commit such that those 
characters never (well, if one runs pre-commit :) ) make it to the docs 
again. Is this something you'd be interested in looking into maybe?

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin
diff mbox series

Patch

diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst
index f81ffb2ab..84c6bb14e 100644
--- a/documentation/contributor-guide/recipe-style-guide.rst
+++ b/documentation/contributor-guide/recipe-style-guide.rst
@@ -192,11 +192,11 @@  Custom tasks should be sorted similarly.
 
 Package specific variables are typically grouped together, e.g.::
 
-    RDEPENDS:${PN} = “foo”
-    RDEPENDS:${PN}-libs = “bar”
+    RDEPENDS:${PN} = "foo"
+    RDEPENDS:${PN}-libs = "bar"
 
-    RRECOMMENDS:${PN} = “one”
-    RRECOMMENDS:${PN}-libs = “two”
+    RRECOMMENDS:${PN} = "one"
+    RRECOMMENDS:${PN}-libs = "two"
 
 Recipe License Fields
 ---------------------