reno/examples/notes/add-complex-example-6b5927c246456896.yaml
Eric Arellano ee73c9409e
Add support for subsections
Subsections will appear underneath their top-level section, in
the order defined in the config file. They will use a ^ or ~
underline rather than -.

Users define subsections by adding a number to the end
of the section entry, either 2 or 3. It will be a subsection
of the parent section above it. This syntax is simpler than others
considered, like nesting lists inside a top-level section. It also
makes it easy for us to support deeper levels of nesting if we'd like.

Like normal sections, in users' notes files, they will use the
ID they define for each subsection.

Change-Id: Ib7b4781de81e19d11a7acb863204067c0946827b
Story: 2010375
2023-03-07 13:56:39 -06:00

44 lines
1.2 KiB
YAML

---
prelude: |
This paragraph will
retain its newlines
when the value is passed to the
reStructuredText parser, which
will then merge them into
a single paragraph without
breaks.
| These
| lines
| are prefixed
| with | so the reStructuredText
| parser will retain
| the line breaks.
features:
This note is a simple string, and does not retain its
formatting when it is rendered in HTML. rst markup here
may break the YAML parser, since the string is not escaped.
fixes:
- Use YAML lists to add multiple items to the same section.
- Another fix could be listed here.
fixes_command_line:
- |
This is a subsection. It requires setting `sections` in
config with an entry underneath `['fixes', 'Bug Fixes']` like
`['fixes_command_line', 'Command Line', 2]`. The `2` at the end
indicates that the entry is a subsection header.
other:
- |
This bullet item includes a paragraph and a nested list,
which works because the content of the YAML list item
is an escaped string block with reStructuredText formatting.
* list item 1
* list item 2
.. code-block:: text
This example is also rendered
correctly on multiple lines
as a pre-formatted block.