xemu/docs/devel
John Snow 3c5f6114d9 qapi: remove "Example" doc section
Fully eliminate the "Example" sections in QAPI doc blocks now that they
have all been converted to arbitrary rST syntax using the
".. qmp-example::" directive. Update tests to match.

Migrating to the new syntax
---------------------------

The old "Example:" or "Examples:" section syntax is now caught as an
error, but "Example::" is stil permitted as explicit rST syntax for an
un-lexed, generic preformatted text block.

('Example' is not special in this case, any sentence that ends with "::"
will start an indented code block in rST.)

Arbitrary rST for Examples is now possible, but it's strongly
recommended that documentation authors use the ".. qmp-example::"
directive for consistent visual formatting in rendered HTML docs. The
":title:" directive option may be used to add extra information into the
title bar for the example. The ":annotated:" option can be used to write
arbitrary rST instead, with nested "::" blocks applying QMP formatting
where desired.

Other choices available are ".. code-block:: QMP" which will not create
an "Example:" box, or the short-form "::" code-block syntax which will
not apply QMP highlighting when used outside of the qmp-example
directive.

Why?
----

This patch has several benefits:

1. Example sections can now be written more arbitrarily, mixing
   explanatory paragraphs and code blocks however desired.

2. Example sections can now use fully arbitrary rST.

3. All code blocks are now lexed and validated as QMP; increasing
   usability of the docs and ensuring validity of example snippets.

   (To some extent - This patch only gaurantees it lexes correctly, not
   that it's valid under the JSON or QMP grammars. It will catch most
   small mistakes, however.)

4. Each qmp-example can be titled or annotated independently without
   bypassing the QMP lexer/validator.

   (i.e. code blocks are now for *code* only, so we don't have to
   sacrifice exposition for having lexically valid examples.)

NOTE: As with the "Notes" conversion (d461c27973), this patch (and the
      three preceding) may change the rendering order for Examples in
      the current generator. The forthcoming qapidoc rewrite will fix
      this by always generating documentation in source order.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20240717021312.606116-10-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-07-17 10:20:54 +02:00
..
migration migration/docs: Update postcopy recover session for SETUP phase 2024-06-21 09:47:59 -03:00
acpi-bits.rst docs/acpi/bits: add some clarity and details while also improving formating 2024-03-09 18:56:37 +03:00
atomics.rst Fix some typos in documentation (found by codespell) 2024-04-02 13:38:40 +03:00
bitops.rst
blkdebug.txt
blkverify.txt
block-coroutine-wrapper.rst block-coroutine-wrapper.py: introduce co_wrapper 2022-12-15 16:07:43 +01:00
build-system.rst meson: Drop the .fa library suffix 2024-07-03 18:41:26 +02:00
ci-definitions.rst.inc
ci-jobs.rst.inc ci: remove centos-steam-8 customer runner 2024-06-06 10:20:46 +01:00
ci-runners.rst.inc docs/ci: clean-up references for consistency 2024-06-06 10:26:08 +01:00
ci.rst docs/devel: clean-up the CI links in the docs 2022-06-01 18:55:04 +01:00
clocks.rst Fix some typos in documentation (found by codespell) 2024-04-02 13:38:40 +03:00
code-of-conduct.rst docs/devel: add a maintainers section to development process 2022-11-22 09:49:07 +00:00
conflict-resolution.rst
control-flow-integrity.rst
decodetree.rst docs: Document decodetree named field syntax 2023-05-30 10:55:39 -07:00
docs.rst docs: correct typos 2024-02-20 22:20:48 +03:00
ebpf_rss.rst
fuzzing.rst docs/fuzz: remove mentions of fork-based fuzzing 2023-02-16 23:02:46 -05:00
index-api.rst hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
index-build.rst docs/devel/docs: Document .hx file syntax 2024-01-15 17:12:22 +00:00
index-internals.rst docs/migration: Create index page 2024-01-16 11:16:10 +08:00
index-process.rst docs/devel: add some front matter to the devel index 2023-07-03 12:52:08 +01:00
index-tcg.rst docs/devel: add some front matter to the devel index 2023-07-03 12:52:08 +01:00
index.rst docs/devel: add some front matter to the devel index 2023-07-03 12:52:08 +01:00
kconfig.rst docs: document new convention for Kconfig board symbols 2024-05-03 15:47:48 +02:00
loads-stores.rst docs/devel/loads-stores: Fix git grep regexes 2023-09-21 14:45:57 +01:00
lockcnt.txt
maintainers.rst docs/devel: add a maintainers section to development process 2022-11-22 09:49:07 +00:00
memory.rst
modules.rst
multi-process.rst docs: Don't mention "-mem-path" in multi-process.rst 2023-09-19 10:23:21 +02:00
multi-thread-tcg.rst tcg/cputlb: Remove non-synced variants of global TLB flushes 2024-05-24 08:57:50 +10:00
multiple-iothreads.txt Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
nested-papr.txt spapr: nested: Document Nested PAPR API 2024-03-13 02:47:04 +10:00
pci.rst hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
qapi-code-gen.rst qapi: remove "Example" doc section 2024-07-17 10:20:54 +02:00
qdev-api.rst docs/devel: split qom-api reference into new file 2023-07-03 12:52:22 +01:00
qgraph.rst
qom-api.rst docs/devel: split qom-api reference into new file 2023-07-03 12:52:22 +01:00
qom.rst include/qom/object.h: New OBJECT_DEFINE_SIMPLE_TYPE{, _WITH_INTERFACES} macros 2024-02-27 13:01:42 +00:00
qtest.rst system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
rcu.txt
replay.rst Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
reset.rst reset: Add RESET_TYPE_SNAPSHOT_LOAD 2024-04-25 10:21:59 +01:00
s390-cpu-topology.rst docs/s390: Fix wrong command example in s390-cpu-topology.rst 2023-11-28 14:27:18 +01:00
s390-dasd-ipl.rst
secure-coding-practices.rst
stable-process.rst
style.rst docs/style: permit inline loop variables 2023-08-30 14:57:44 +01:00
submitting-a-patch.rst docs/devel: fix minor typo in submitting-a-patch.rst 2024-04-25 15:15:25 +02:00
submitting-a-pull-request.rst docs/devel: add a maintainers section to development process 2022-11-22 09:49:07 +00:00
tcg-icount.rst accel/tcg: Remove CF_LAST_IO 2023-11-14 10:40:54 -08:00
tcg-ops.rst tcg: Introduce TCG_COND_TST{EQ,NE} 2024-02-03 23:43:47 +00:00
tcg-plugins.rst docs: add precision about capstone for execlog plugin 2024-07-02 09:36:39 +02:00
tcg.rst docs/devel: add some front matter to the devel index 2023-07-03 12:52:08 +01:00
testing.rst docs/devel: update references to centos to non-versioned container 2024-06-06 10:25:26 +01:00
tracing.rst tracetool: remove redundant --target-type / --target-name args 2024-03-12 14:52:07 -04:00
trivial-patches.rst
ui.rst
vfio-iommufd.rst docs/devel: Add VFIO iommufd backend documentation 2023-12-19 19:03:38 +01:00
virtio-backends.rst docs/devel: start documenting writing VirtIO devices 2022-05-16 04:38:40 -04:00
writing-monitor-commands.rst docs/devel/writing-monitor-commands: Minor improvements 2024-03-04 07:12:40 +01:00
zoned-storage.rst docs/zoned-storage:add zoned emulation use case 2023-05-15 08:19:04 -04:00