Commit 20ac3a1
committed
MDS060: tighten ATX-heading guard and post-prefix indent
Two header-detection bugs surfaced by Copilot review:
- `isHeader` rejected any line whose trimmed content started with
`#`, but `#1 | Title` is a valid first cell, not an ATX heading.
Limit the guard to actual ATX shape — one to six `#` followed
by space, tab, or end of line — via a new `isATXHeading` helper.
- `parseRow` checked `HasPrefix(c, "|")` against the un-trimmed
row content, so a row like `> | a | b |` (extra indent after
the blockquote marker) had `leading` come out false even though
`logicalCells` already trimmed and treated it as a real edge.
Trim the same way before edge detection.
Addresses Copilot review feedback on PR #353.
https://claude.ai/code/session_012X1wVbY7u9DNMpGRhNurzT1 parent ec34d42 commit 20ac3a1
2 files changed
Lines changed: 53 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
| 403 | + | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
409 | 429 | | |
410 | 430 | | |
411 | 431 | | |
| |||
463 | 483 | | |
464 | 484 | | |
465 | 485 | | |
466 | | - | |
467 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
468 | 493 | | |
469 | 494 | | |
470 | 495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
0 commit comments