Skip to content

Conversation

@justinmk
Copy link
Member

@justinmk justinmk commented Dec 14, 2025

Problem

Parser supports bullet lists, but not number lists.

Expected behavior

  • Capture numbered listiems in the existing line_li form.
  • Capture prefix so that consumers can check if a listitem is ordered (numbered) or unordered.

Example:

1. Item 1
2. Item 2
   continued item
3. Item 3

fix #144

Before / After

image

- Capture numbered listiems in the existing `line_li` form.
- Introduce `prefix` capture so that consumers can check if a listitem
  is ordered (numbered) or unordered.
@justinmk
Copy link
Member Author

CI failure will be fixed by neovim/neovim#36860

Comment on lines +378 to +384
NOT listitem (FIXME)
================================================================================
block1
- block1

block1 line1
1. block1 line2
Copy link
Member Author

@justinmk justinmk Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially thought that this isn't wanted, but it's more common that it is wanted. So will change this test to "expected" instead of "FIXME".

This matches the behavior of lists in markdown.

@justinmk justinmk merged commit b4e1a80 into master Dec 15, 2025
0 of 2 checks passed
@justinmk justinmk deleted the listnum branch December 15, 2025 08:21
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.

numbered list items

2 participants