Commit a37540e
Render bullet lists as proper ProseMirror nodes in from_markdown() (#35)
* Render bullet lists as proper ProseMirror nodes in from_markdown()
from_markdown() stripped bullet markers (* / -) but emitted each item
as an independent paragraph node. Substack's ProseMirror editor expects
a single bullet_list node wrapping list_item children. Without this
structure, bullet lists render as disconnected paragraphs in the
published post.
Consecutive bullet lines are now accumulated and flushed as a single
bullet_list node with proper list_item > paragraph nesting. Non-bullet
lines and blank lines flush the pending list, so mixed content works
correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add before/after screenshots for PR
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: YF Chau <yfchau@YFs-MacBook-Air.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3277368 commit a37540e
3 files changed
+34
-7
lines changedLoading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
618 | 635 | | |
619 | 636 | | |
620 | 637 | | |
| 638 | + | |
621 | 639 | | |
622 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
623 | 643 | | |
624 | | - | |
| 644 | + | |
625 | 645 | | |
626 | | - | |
| 646 | + | |
627 | 647 | | |
628 | | - | |
629 | | - | |
630 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
631 | 656 | | |
632 | 657 | | |
| 658 | + | |
| 659 | + | |
633 | 660 | | |
634 | 661 | | |
635 | 662 | | |
| |||
0 commit comments