Skip to content

Conversation

@spicyfalafel
Copy link
Contributor

Adds :start key in ordered lists parse result, which is not used in the rendering.
Useful if you don't want to align blocks between two items all the time to fix ordering.

1. Item 1

Some text

2. Item 2

Extract the start number from OrderedList nodes in commonmark-java parser
and add it as a :start key in the AST node. This allows interrupted lists
to preserve their numbering.

Example:

  1. First
  ```
  code
  ```
  2. Second

Now parses as two separate lists with the second having :start 2.
It does not affect rendering.
@borkdude
Copy link
Contributor

LGTM, what about you @zampino ?

@borkdude borkdude merged commit 147ba4d into nextjournal:main Oct 27, 2025
@borkdude
Copy link
Contributor

@spicyfalafel Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants