Skip to content

fix(preview): parse tight list items with pulldown-cmark 0.13.4 - #20

Merged
astrazds merged 2 commits into
mainfrom
cursor/fix-preview-parser-panic-c8cf
Oct 16, 2026
Merged

astrazds merged 2 commits into
mainfrom
cursor/fix-preview-parser-panic-c8cf

Conversation

@astrazds

Copy link
Copy Markdown
Owner

Why

Preview turns a note into HTML with pulldown-cmark 0.13.3. That parser panics on a short list item, so Linux preview aborts and the Windows session faults.

What changed

  • render_markdown_preview_body now covers the list item - [n]:Z followed by a blank tab line.
  • pulldown-cmark moves from 0.13.3 to 0.13.4.

Scope

Covers the preview parser panic. Leaves other dependency updates alone.

Blast Radius

Ordinary notes still go through the same renderer. The patch only changes how an empty tight paragraph is skipped.

Verification

  • cargo test -p nota-core --locked --lib renders_a_link_reference_shaped_list_item panicked at pulldown-cmark-0.13.3/src/parse.rs:2367 before the bump, then passed.
  • cargo test -p nota-core --locked passed. 99 library tests plus the backup and transition suites.
  • cargo test -p nota-app --locked --lib passed. 40 tests.
  • cargo test -p nota-app --locked --test session_workflows passed. 12 tests.
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 16, 2026 02:24
The preview builder walks this input while it turns a note into HTML.

Co-authored-by: Andrejs Strazds <astrazds@users.noreply.github.com>
Version 0.13.3 unwraps an empty tight paragraph and aborts preview.

Co-authored-by: Andrejs Strazds <astrazds@users.noreply.github.com>
@astrazds
astrazds merged commit 0caff0c into main Oct 16, 2026
3 checks passed
@astrazds
astrazds deleted the cursor/fix-preview-parser-panic-c8cf branch October 18, 2026 21:00
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