Commit bb6c5a9
committed
Fix document-root block scalar with column-0 content
A document-root block scalar (`--- |` or a bare `|`/`>` at column 0, no
mapping key before it) has a body that may sit at column 0. The node-indent-
bounded block-scalar region couldn't keep it — its `while: \G(?=\1[ \t]|…)`
has an empty `\1` node indent at column 0, so a column-0 body line failed
both arms and leaked to the top-level rules, where a `%`-led body line (a
PostScript header `%!PS-Adobe-2.0`) mis-scoped as a directive.
Add a dedicated `${bsKey}-doc` region derived from
indent.blockScalar.documentMarkers: it bounds the body at the next column-0
document marker (`---`/`...`) or EOF instead of by node indent, reusing the
existing introducer/funky-body helper. Ranked above the plain block-scalar
region so it wins the column-0 case; its lookahead requires the introducer
to be the first value token so it never steals a key:/dash/nested header.
Exposed by the extended role-oracle: YAML lit.string now 556/556, zero
Monogram-wrong; Monogram 99.2% vs official 98.9%. Other 6 grammars
byte-identical.1 parent 4fef1df commit bb6c5a9
2 files changed
Lines changed: 125 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4741 | 4741 | | |
4742 | 4742 | | |
4743 | 4743 | | |
| 4744 | + | |
| 4745 | + | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
4744 | 4771 | | |
4745 | 4772 | | |
4746 | 4773 | | |
| |||
7268 | 7295 | | |
7269 | 7296 | | |
7270 | 7297 | | |
7271 | | - | |
| 7298 | + | |
| 7299 | + | |
| 7300 | + | |
| 7301 | + | |
| 7302 | + | |
| 7303 | + | |
7272 | 7304 | | |
7273 | 7305 | | |
7274 | 7306 | | |
| 7307 | + | |
7275 | 7308 | | |
7276 | 7309 | | |
7277 | 7310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
415 | 506 | | |
416 | 507 | | |
417 | 508 | | |
| |||
0 commit comments