Commit 282affe
authored
fix: list continuation & crlf bug (#777)
* chore: adjust commit message rule
* fix: paragraph after nested list incorrectly absorbed (fixes #776)
Paragraphs following nested lists after blank lines were incorrectly being
absorbed into the nested list item instead of being parsed as separate blocks.
This fix ensures paragraphs are correctly separated from nested lists per
CommonMark specification.
* fix: lists don't render correctly with CRLF line endings (fixes #773)
Lists and other markdown structures were incorrectly parsed when input had
CRLF line endings. This fix ensures CRLF line endings are properly handled
as line boundaries without requiring input normalization.
* refactor: compress reference definition parsing
Extract shared utilities to reduce code duplication in parseRefContent and parseFootnoteContent. New helpers (isBlockStartAt, isTitleDelimiter, parseQuotedTitle, parseParenTitle, scanFootnoteEnd) consolidate repeated patterns across reference and footnote parsing.
- parseRefContent: 507→383 lines (-24%)
- parseFootnoteContent: 185→123 lines (-34%)
- Net reduction: 53 lines
All tests passing, performance within 5% of baseline.
* fix: handle CRLF in reference definition titles and footnote boundaries
- parseQuotedTitle: detect CRLF blank lines to reject invalid titles
- parseParenTitle: detect CRLF blank lines to reject invalid titles
- scanFootnoteEnd: detect CRLF blank lines to stop absorbing content
- Add CHAR_PAREN_OPEN/CLOSE constants
- Remove unused scanToBlankLine function1 parent 365948d commit 282affe
File tree
9 files changed
+679
-279
lines changed- .changeset
- .cursor/rules
- scripts
- src
9 files changed
+679
-279
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
0 commit comments