From 12b7be843aac001d4d25fa960d46a6aa5fbda6ff Mon Sep 17 00:00:00 2001 From: Jason Kridner <jkridner@beagleboard.org> Date: Wed, 28 Sep 2022 01:11:45 -0400 Subject: [PATCH] Try inline literal hack to avoid italic font on callouts --- _ext/callouts.py | 2 +- intro/contribution/rst-cheat-sheet.rst | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/_ext/callouts.py b/_ext/callouts.py index 97bb23e4..8ed544ae 100644 --- a/_ext/callouts.py +++ b/_ext/callouts.py @@ -47,7 +47,7 @@ class LiteralIncludeVisitor(nodes.NodeVisitor): source = str(node.rawsource) for i in range(1, 20): source = source.replace( - f"<{i}>", chr(int(f"0x{BASE_NUM + i}", base=16)) + f"<{i}>", "``" + chr(int(f"0x{BASE_NUM + i}", base=16)) + "``" ) node.rawsource = source node[:] = [nodes.Text(source)] diff --git a/intro/contribution/rst-cheat-sheet.rst b/intro/contribution/rst-cheat-sheet.rst index e392b49e..db3626da 100644 --- a/intro/contribution/rst-cheat-sheet.rst +++ b/intro/contribution/rst-cheat-sheet.rst @@ -29,14 +29,15 @@ more) the lenth of the heading text, for example: .. code-block:: ReStructuredText incorrect H1 - ##### # <1> + ##### <1> correct H1 - ############ # <2> + ############ <2> .. annotations:: - * <1> length of heading sybol ``#`` is smaller than the content above. - * <2> Shows the correct way of setting the document title (H1) with ``#``. + <1> Length of heading sybol ``#`` is smaller than the content above. + + <2> Shows the correct way of setting the document title (H1) with ``#``. -- GitLab