@@ -1038,20 +1038,15 @@ default to "Example:".
1038
1038
A simple QMP example::
1039
1039
1040
1040
# .. qmp-example::
1041
- # :title: Using query-block
1042
1041
#
1043
- # -> { "execute": "query-block " }
1044
- # <- { ... }
1042
+ # -> { "execute": "query-name " }
1043
+ # <- { "return": { "name": "Fred" } }
1045
1044
1046
1045
More complex or multi-step examples where exposition is needed before
1047
1046
or between QMP code blocks can be created by using the ``:annotated: ``
1048
1047
directive option. When using this option, nested QMP code blocks must
1049
1048
be entered explicitly with rST's ``:: `` syntax.
1050
1049
1051
- Highlighting in non-QMP languages can be accomplished by using the
1052
- ``.. code-block:: lang `` directive, and non-highlighted text can be
1053
- achieved by omitting the language argument.
1054
-
1055
1050
For example::
1056
1051
1057
1052
# .. qmp-example::
@@ -1061,11 +1056,21 @@ For example::
1061
1056
# This is a more complex example that can use
1062
1057
# ``arbitrary rST syntax`` in its exposition::
1063
1058
#
1064
- # -> { "execute": "query-block" }
1065
- # <- { ... }
1059
+ # -> { "execute": "query-block" }
1060
+ # <- { "return": [
1061
+ # {
1062
+ # "device": "ide0-hd0",
1063
+ # ...
1064
+ # }
1065
+ # ...
1066
+ # ] }
1066
1067
#
1067
1068
# Above, lengthy output has been omitted for brevity.
1068
1069
1070
+ Highlighting in non-QMP languages can be accomplished by using the
1071
+ ``.. code-block:: lang `` directive, and non-highlighted text can be
1072
+ achieved by omitting the language argument.
1073
+
1069
1074
1070
1075
Examples of complete definition documentation::
1071
1076
0 commit comments