diff mbox series

[v6,12/21] tests/qapi-schema: Convert doc-good.json to rST-style strong/emphasis

Message ID 20200925162316.21205-13-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show
Series Convert QAPI doc comments to generate rST instead of texinfo | expand

Commit Message

Peter Maydell Sept. 25, 2020, 4:23 p.m. UTC
doc-good.json currently uses the old *strong* and _emphasis_ markup.
As part of the conversion to rST this needs to switch to **strong**
and *emphasis*, because rST uses underscores as part of its markup
of hyperlinks and will otherwise warn about the syntax error.

In commit a660eed482063b we fixed up the in-tree uses of the
old markup:
 1) _this_ was replaced with *this*
 2) the only in-tree use of *this* was left alone (turning
    a 'strong' into an 'emphasis')
(and so currently in-tree nothing is using either new-style
**strong** or old-style _emphasis_).

Update doc-good.json in a similar way:
 1) replace _this_ with *this*
 2) remove the usage of old-style *this*

(This slightly reduces the coverage for the old Texinfo generator,
which is about to go away, but is fine for the new rST generator
because that does not need to handle strong/emphasis itself because
it is simply passing the entire text as raw rST to Sphinx.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 tests/qapi-schema/doc-good.json | 2 +-
 tests/qapi-schema/doc-good.out  | 2 +-
 tests/qapi-schema/doc-good.texi | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Markus Armbruster Sept. 29, 2020, 8:33 a.m. UTC | #1
Peter Maydell <peter.maydell@linaro.org> writes:

> doc-good.json currently uses the old *strong* and _emphasis_ markup.
> As part of the conversion to rST this needs to switch to **strong**
> and *emphasis*, because rST uses underscores as part of its markup
> of hyperlinks and will otherwise warn about the syntax error.
>
> In commit a660eed482063b we fixed up the in-tree uses of the
> old markup:
>  1) _this_ was replaced with *this*
>  2) the only in-tree use of *this* was left alone (turning
>     a 'strong' into an 'emphasis')
> (and so currently in-tree nothing is using either new-style
> **strong** or old-style _emphasis_).
>
> Update doc-good.json in a similar way:
>  1) replace _this_ with *this*
>  2) remove the usage of old-style *this*
>
> (This slightly reduces the coverage for the old Texinfo generator,
> which is about to go away, but is fine for the new rST generator
> because that does not need to handle strong/emphasis itself because
> it is simply passing the entire text as raw rST to Sphinx.)
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Markus Armbruster <armbru@redhat.com>
diff mbox series

Patch

diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json
index c6822145c49..e9af0857db7 100644
--- a/tests/qapi-schema/doc-good.json
+++ b/tests/qapi-schema/doc-good.json
@@ -10,7 +10,7 @@ 
 #
 # == Subsection
 #
-# *strong* _with emphasis_
+# *with emphasis*
 # @var {in braces}
 #
 # * List item one
diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out
index b7e3f4313da..419284dae29 100644
--- a/tests/qapi-schema/doc-good.out
+++ b/tests/qapi-schema/doc-good.out
@@ -73,7 +73,7 @@  doc freeform
     body=
 == Subsection
 
-*strong* _with emphasis_
+*with emphasis*
 @var {in braces}
 
 * List item one
diff --git a/tests/qapi-schema/doc-good.texi b/tests/qapi-schema/doc-good.texi
index 12808989ffb..29abef33e98 100644
--- a/tests/qapi-schema/doc-good.texi
+++ b/tests/qapi-schema/doc-good.texi
@@ -4,7 +4,7 @@ 
 
 @subsection Subsection
 
-@strong{strong} @emph{with emphasis}
+@strong{with emphasis}
 @code{var} @{in braces@}
 
 @itemize @bullet