From 65fa48c79f20a37c7204f9e43dd7cc3058aa066c Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 26 Jun 2024 18:21:19 -0400 Subject: qapi/parser: don't parse rST markup as section headers The double-colon synax is rST formatting that precedes a literal code block. We do not want to capture these as QAPI-specific sections. Coerce blocks that start with e.g. "Example::" to be parsed as untagged paragraphs instead of special tagged sections. Signed-off-by: John Snow Message-ID: <20240626222128.406106-14-jsnow@redhat.com> Reviewed-by: Markus Armbruster [Indentation tweaked for consistency] Signed-off-by: Markus Armbruster --- tests/qapi-schema/doc-good.json | 3 +++ tests/qapi-schema/doc-good.out | 3 +++ tests/qapi-schema/doc-good.txt | 3 +++ 3 files changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json index 32ff910..b565895 100644 --- a/tests/qapi-schema/doc-good.json +++ b/tests/qapi-schema/doc-good.json @@ -181,6 +181,9 @@ # - *verbatim* # - {braces} # +# Note:: +# Ceci n'est pas une note +# # Since: 2.10 ## { 'command': 'cmd', diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out index 631dc9f..a8e9456 100644 --- a/tests/qapi-schema/doc-good.out +++ b/tests/qapi-schema/doc-good.out @@ -190,6 +190,9 @@ frobnicate section=Examples - *verbatim* - {braces} + section=None +Note:: + Ceci n'est pas une note section=Since 2.10 doc symbol=cmd-boxed diff --git a/tests/qapi-schema/doc-good.txt b/tests/qapi-schema/doc-good.txt index d8bfa74..30d457e 100644 --- a/tests/qapi-schema/doc-good.txt +++ b/tests/qapi-schema/doc-good.txt @@ -231,6 +231,9 @@ Examples - *verbatim* - {braces} +Note:: + Ceci n'est pas une note + Since ~~~~~ -- cgit v1.1