djot
djot copied to clipboard
Syntax for block attributes for list elements (`<li>`)
As discussed in https://github.com/jgm/djot/discussions/183 there is currently no way to attach attributes to a list element.
This
{#foo .bar .baz key="my value"}
- list element
attaches the attribute to the list container (<ul>) but not the list element.
To solve this problem, I'm suggesting the following syntax:
- item 1
- {#foo .bar .baz key="my value"} item 2
- item 3
The output should look like this:
<ul>
<li>item 1</li>
<li class="bar baz" id="foo" key="my value">item 2</li>
<li>item 3</li>
</ul>
The same should work for other list markers:
- {#foo .bar .baz key="my value"} list item
+ {#foo .bar .baz key="my value"} list item
* {#foo .bar .baz key="my value"} list item
1. {#foo .bar .baz key="my value"} list item
1) {#foo .bar .baz key="my value"} list item
(1) {#foo .bar .baz key="my value"} list item
a. {#foo .bar .baz key="my value"} list item
a) {#foo .bar .baz key="my value"} list item
(a) {#foo .bar .baz key="my value"} list item
A. {#foo .bar .baz key="my value"} list item
A) {#foo .bar .baz key="my value"} list item
(A) {#foo .bar .baz key="my value"} list item
i. {#foo .bar .baz key="my value"} list item
i) {#foo .bar .baz key="my value"} list item
(i) {#foo .bar .baz key="my value"} list item
I. {#foo .bar .baz key="my value"} list item
I) {#foo .bar .baz key="my value"} list item
(I) {#foo .bar .baz key="my value"} list item
: {#foo .bar .baz key="my value"} list item
- [ ] {#foo .bar .baz key="my value"} list item