mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
docs/sphinx/qmp_lexer: Generalize elision syntax
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>
This commit is contained in:
parent
e27608d053
commit
bc361f2f9b
5 changed files with 8 additions and 6 deletions
|
@ -1029,7 +1029,9 @@ used.
|
||||||
QMP Examples can be added by using the ``.. qmp-example::`` directive.
|
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
|
In its simplest form, this can be used to contain a single QMP code
|
||||||
block which accepts standard JSON syntax with additional server
|
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:``
|
Optionally, a plaintext title may be provided by using the ``:title:``
|
||||||
directive option. If the title is omitted, the example title will
|
directive option. If the title is omitted, the example title will
|
||||||
|
@ -1062,7 +1064,7 @@ For example::
|
||||||
# "device": "ide0-hd0",
|
# "device": "ide0-hd0",
|
||||||
# ...
|
# ...
|
||||||
# }
|
# }
|
||||||
# ...
|
# ... more ...
|
||||||
# ] }
|
# ] }
|
||||||
#
|
#
|
||||||
# Above, lengthy output has been omitted for brevity.
|
# Above, lengthy output has been omitted for brevity.
|
||||||
|
|
|
@ -24,7 +24,7 @@ class QMPExampleMarkersLexer(RegexLexer):
|
||||||
'root': [
|
'root': [
|
||||||
(r'-> ', token.Generic.Prompt),
|
(r'-> ', token.Generic.Prompt),
|
||||||
(r'<- ', token.Generic.Prompt),
|
(r'<- ', token.Generic.Prompt),
|
||||||
(r' ?\.{3} ?', token.Generic.Prompt),
|
(r'\.{3}( .* \.{3})?', token.Generic.Prompt),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@
|
||||||
#
|
#
|
||||||
# -> "this example"
|
# -> "this example"
|
||||||
#
|
#
|
||||||
# <- "has no title"
|
# <- ... has no title ...
|
||||||
##
|
##
|
||||||
{ 'command': 'cmd-boxed', 'boxed': true,
|
{ 'command': 'cmd-boxed', 'boxed': true,
|
||||||
'data': 'Object',
|
'data': 'Object',
|
||||||
|
|
|
@ -217,7 +217,7 @@ another feature
|
||||||
|
|
||||||
-> "this example"
|
-> "this example"
|
||||||
|
|
||||||
<- "has no title"
|
<- ... has no title ...
|
||||||
doc symbol=EVT_BOXED
|
doc symbol=EVT_BOXED
|
||||||
body=
|
body=
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ Example::
|
||||||
|
|
||||||
-> "this example"
|
-> "this example"
|
||||||
|
|
||||||
<- "has no title"
|
<- ... has no title ...
|
||||||
|
|
||||||
|
|
||||||
"EVT_BOXED" (Event)
|
"EVT_BOXED" (Event)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue