org mode supports [1] setting the value attribute [2] of ordered list items to change the numbering for the current and following items. Let's do the same. As the attribute has no meaning for other types of lists [2] we'll just not support it for those cases [3]. [1] https://orgmode.org/manual/Plain-Lists.html#Plain-Lists [2] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attributes [3] Org mode seems to instead set the id attribute for e.g. unordered lists starting with `[@\d+]\s` - but I don't really see the value in that and will skip that for now.
1.6 KiB
1.6 KiB
- unordered list item 1
-
list item with empty first and second line
normally an empty line breaks the list item - but we make an exception for the first line and don't count it towards that limit -
unordered list item 2 - with
inline
markup-
ordered sublist item 1
- ordered sublist item 1
- ordered sublist item 2
- ordered sublist item 3
- ordered sublist item 2
- list item with empty first and second line - see above
-
-
unordered list item 3 - and a link and some lines of text
-
and another subitem
echo with a block
-
and another one with a table
a b c 1 2 3 and text with an empty line in between as well!
-
-
unordered list item 4
with an example that spans multiple lines
descriptive lists
- term
- details continued details
- ?
- details without a term
- term
- details on a new line
- term
-
details on a new line (with an empty line in between) continued
echo "Hello World!"
some list termination tests
- unordered 1
- unordered 2
- ordered 1
- ordered 2
- ordered 1
- ordered 2
- unordered 1
- unordered 2
- ordered 1
- ordered 2
- unordered descriptive
- 1
- unordered descriptive
- 2
- ordered descriptive
- 1
- ordered descriptive
- 2
- unordered 1
- unordered 2
- use `[@n]` to change the value of list items
- foobar
- that even works in combination with list statuses (`[ ]`)