]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
docs/sphinx/qmp_lexer: Generalize elision syntax
authorMarkus Armbruster <armbru@redhat.com>
Fri, 4 Apr 2025 12:14:08 +0000 (14:14 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 8 Apr 2025 07:04:34 +0000 (09:04 +0200)
Accept "... lorem ipsum ..."  in addition to "...".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20250404121413.1743790-7-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
docs/devel/qapi-code-gen.rst
docs/sphinx/qmp_lexer.py
tests/qapi-schema/doc-good.json
tests/qapi-schema/doc-good.out
tests/qapi-schema/doc-good.txt

index 25a46fafb6d6b5386d6ff458c05a17ba5c5615ea..231cc0fecf79bd04c3bab901ceccec5e716308c7 100644 (file)
@@ -1029,7 +1029,9 @@ used.
 QMP Examples can be added by using the ``.. qmp-example::`` directive.
 In its simplest form, this can be used to contain a single QMP code
 block which accepts standard JSON syntax with additional server
-directionality indicators (``->`` and ``<-``), and elisions (``...``).
+directionality indicators (``->`` and ``<-``), and elisions.  An
+elision is commonly ``...``, but it can also be or a pair of ``...``
+with text in between.
 
 Optionally, a plaintext title may be provided by using the ``:title:``
 directive option.  If the title is omitted, the example title will
@@ -1062,7 +1064,7 @@ For example::
   #               "device": "ide0-hd0",
   #               ...
   #             }
-  #             ...
+  #             ... more ...
   #          ] }
   #
   #    Above, lengthy output has been omitted for brevity.
index a59de8a079c046ecd1b7ca58ed5db1135a17c0cd..1bd1b81b70f93a4c517286c4a3f4f90f3208017c 100644 (file)
@@ -24,7 +24,7 @@ class QMPExampleMarkersLexer(RegexLexer):
         'root': [
             (r'-> ', token.Generic.Prompt),
             (r'<- ', token.Generic.Prompt),
-            (r' ?\.{3} ?', token.Generic.Prompt),
+            (r'\.{3}( .* \.{3})?', token.Generic.Prompt),
         ]
     }
 
index 0a4f139f8352d097491d749a2ced37e5a0e6596d..14b808f90905bdc7973ef27fb9d514bc4e807f34 100644 (file)
 #
 #    -> "this example"
 #
-#    <- "has no title"
+#    <- ... has no title ...
 ##
 { 'command': 'cmd-boxed', 'boxed': true,
   'data': 'Object',
index 5773f1dd6d62a9ba8fa76f7ea003f023cf229f22..dc8352eed4f339cf3a8345afd4e8eace6d730fac 100644 (file)
@@ -217,7 +217,7 @@ another feature
 
    -> "this example"
 
-   <- "has no title"
+   <- ... has no title ...
 doc symbol=EVT_BOXED
     body=
 
index cb37db606a6299e55f0abc4c6aadbd893470a803..17a1d56ef1a4128295b60593ebb1c889ad425ae8 100644 (file)
@@ -264,7 +264,7 @@ Example::
 
    -> "this example"
 
-   <- "has no title"
+   <- ... has no title ...
 
 
 "EVT_BOXED" (Event)