Commit 9530edaeca
9530edaeca452048c6529cc32ae5420f07467a55
parent: 301ff84642
Verified · cmc
cmc <hello@cleberg.net> · 2026-08-31 23:45 UTC
Add a listblocks case: block elements inside list items
Covers src, example, quote, and table blocks in a list item, plus an item
carrying both a sublist and a block. orgo wraps an item's paragraphs in <p>
only when there is more than one; blocks follow bare.
Layout: unified · split
cases/listblocks.html
added
+37
| @@ -0,0 +1,37 @@ |
| 1 | <h2 id="source-blocks">Source blocks</h2> |
| 2 | <ol> |
| 3 | <li>Fork the repository</li> |
| 4 | <li>Create a new branch:<pre><code class="language-bash highlight"><span class="source shell bash"><span class="meta function-call shell"><span class="variable function shell">git</span></span><span class="meta function-call arguments shell"> checkout<span class="variable parameter option shell"><span class="punctuation definition parameter shell"> -</span>b</span> my-feature</span></span></code></pre> |
| 5 | </li> |
| 6 | <li>Open a pull request</li> |
| 7 | </ol> |
| 8 | <h2 id="other-blocks">Other blocks</h2> |
| 9 | <ul> |
| 10 | <li>an item with an example block<pre>plain example text</pre> |
| 11 | </li> |
| 12 | <li>an item with a quote<blockquote> |
| 13 | <p>quoted line</p> |
| 14 | </blockquote> |
| 15 | </li> |
| 16 | </ul> |
| 17 | <h2 id="blocks-alongside-other-content">Blocks alongside other content</h2> |
| 18 | <ul> |
| 19 | <li>an item with a sublist and a block<ul> |
| 20 | <li>inner item</li> |
| 21 | </ul> |
| 22 | <pre><code class="language-sh highlight"><span class="source shell bash"><span class="meta function-call shell"><span class="support function echo shell">echo</span></span><span class="meta function-call arguments shell"> hi</span></span></code></pre> |
| 23 | </li> |
| 24 | <li><p>an item with two paragraphs and a block</p> |
| 25 | <p>the second paragraph</p> |
| 26 | <pre><code class="language-sh highlight"><span class="source shell bash"><span class="meta function-call shell"><span class="support function echo shell">echo</span></span><span class="meta function-call arguments shell"> again</span></span></code></pre> |
| 27 | </li> |
| 28 | <li>an item with a table<table> |
| 29 | <thead> |
| 30 | <tr><th>a</th><th>b</th></tr> |
| 31 | </thead> |
| 32 | <tbody> |
| 33 | <tr><td>1</td><td>2</td></tr> |
| 34 | </tbody> |
| 35 | </table> |
| 36 | </li> |
| 37 | </ul> |
cases/listblocks.org
added
+46
| @@ -0,0 +1,46 @@ |
| 1 | #+TITLE: Blocks inside list items |
| 2 | |
| 3 | * Source blocks |
| 4 | |
| 5 | 1. Fork the repository |
| 6 | 2. Create a new branch: |
| 7 | #+begin_src bash |
| 8 | git checkout -b my-feature |
| 9 | #+end_src |
| 10 | 3. Open a pull request |
| 11 | |
| 12 | * Other blocks |
| 13 | |
| 14 | - an item with an example block |
| 15 | |
| 16 | #+begin_example |
| 17 | plain example text |
| 18 | #+end_example |
| 19 | |
| 20 | - an item with a quote |
| 21 | |
| 22 | #+begin_quote |
| 23 | quoted line |
| 24 | #+end_quote |
| 25 | |
| 26 | * Blocks alongside other content |
| 27 | |
| 28 | - an item with a sublist and a block |
| 29 | - inner item |
| 30 | #+begin_src sh |
| 31 | echo hi |
| 32 | #+end_src |
| 33 | |
| 34 | - an item with two paragraphs and a block |
| 35 | |
| 36 | the second paragraph |
| 37 | |
| 38 | #+begin_src sh |
| 39 | echo again |
| 40 | #+end_src |
| 41 | |
| 42 | - an item with a table |
| 43 | |
| 44 | | a | b | |
| 45 | |---+---| |
| 46 | | 1 | 2 | |
cases/listblocks.skeleton
added
+94
| @@ -0,0 +1,94 @@ |
| 1 | <h2> |
| 2 | "Source blocks" |
| 3 | </h2> |
| 4 | <ol> |
| 5 | <li> |
| 6 | "Fork the repository" |
| 7 | </li> |
| 8 | <li> |
| 9 | "Create a new branch:" |
| 10 | <pre> |
| 11 | <code> |
| 12 | "git checkout -b my-feature" |
| 13 | </code> |
| 14 | </pre> |
| 15 | </li> |
| 16 | <li> |
| 17 | "Open a pull request" |
| 18 | </li> |
| 19 | </ol> |
| 20 | <h2> |
| 21 | "Other blocks" |
| 22 | </h2> |
| 23 | <ul> |
| 24 | <li> |
| 25 | "an item with an example block" |
| 26 | <pre> |
| 27 | "plain example text" |
| 28 | </pre> |
| 29 | </li> |
| 30 | <li> |
| 31 | "an item with a quote" |
| 32 | <blockquote> |
| 33 | <p> |
| 34 | "quoted line" |
| 35 | </p> |
| 36 | </blockquote> |
| 37 | </li> |
| 38 | </ul> |
| 39 | <h2> |
| 40 | "Blocks alongside other content" |
| 41 | </h2> |
| 42 | <ul> |
| 43 | <li> |
| 44 | "an item with a sublist and a block" |
| 45 | <ul> |
| 46 | <li> |
| 47 | "inner item" |
| 48 | </li> |
| 49 | </ul> |
| 50 | <pre> |
| 51 | <code> |
| 52 | "echo hi" |
| 53 | </code> |
| 54 | </pre> |
| 55 | </li> |
| 56 | <li> |
| 57 | <p> |
| 58 | "an item with two paragraphs and a block" |
| 59 | </p> |
| 60 | <p> |
| 61 | "the second paragraph" |
| 62 | </p> |
| 63 | <pre> |
| 64 | <code> |
| 65 | "echo again" |
| 66 | </code> |
| 67 | </pre> |
| 68 | </li> |
| 69 | <li> |
| 70 | "an item with a table" |
| 71 | <table> |
| 72 | <thead> |
| 73 | <tr> |
| 74 | <th> |
| 75 | "a" |
| 76 | </th> |
| 77 | <th> |
| 78 | "b" |
| 79 | </th> |
| 80 | </tr> |
| 81 | </thead> |
| 82 | <tbody> |
| 83 | <tr> |
| 84 | <td> |
| 85 | "1" |
| 86 | </td> |
| 87 | <td> |
| 88 | "2" |
| 89 | </td> |
| 90 | </tr> |
| 91 | </tbody> |
| 92 | </table> |
| 93 | </li> |
| 94 | </ul> |
manifest.json
+6
| @@ -31,6 +31,12 @@ |
| 31 | 31 | "scope": "in", |
| 32 | 32 | "note": "Heading anatomy, including the negatives: 'TODOs' is not a keyword, a bare 'DONE' has no title." |
| 33 | 33 | }, |
| 34 | { |
| 35 | "name": "listblocks", |
| 36 | "constructs": ["src-block-in-list-item", "example-block-in-list-item", "quote-block-in-list-item", "table-in-list-item", "sublist-with-block", "multi-paragraph-item"], |
| 37 | "scope": "in", |
| 38 | "note": "Block-level elements inside list items — the case a paragraphs-only item model gets wrong, folding #+begin_src into the item's prose." |
| 39 | }, |
| 34 | 40 | { |
| 35 | 41 | "name": "lists", |
| 36 | 42 | "constructs": ["nested-unordered", "ordered-list", "nested-ordered", "checkbox", "checkbox-partial", "description-list", "inline-markup-in-term", "multi-paragraph-item"], |