Commit 9b26950
authored
Allow fenced comments to interrupt paragraphs (#79)
Fenced comment blocks (%%%) can now interrupt paragraphs without
requiring a preceding blank line. This makes comments truly
"invisible" from a formatting perspective.
Before this change:
```
Lorem ipsum
%%%
comment
%%%
dolor sit amet
```
Would be treated as a single paragraph with %%% as literal text.
After this change:
The above produces two separate paragraphs with the comment stripped.
This is a special case for comments since they should not affect
document formatting. Other block elements still follow the djot spec
and require blank lines to interrupt paragraphs.1 parent f5f043b commit 9b26950
File tree
3 files changed
+77
-0
lines changed- docs
- src/Parser
- tests/TestCase
3 files changed
+77
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
478 | 501 | | |
479 | 502 | | |
480 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2922 | 2922 | | |
2923 | 2923 | | |
2924 | 2924 | | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2925 | 2931 | | |
2926 | 2932 | | |
2927 | 2933 | | |
| |||
2973 | 2979 | | |
2974 | 2980 | | |
2975 | 2981 | | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
2976 | 2985 | | |
2977 | 2986 | | |
2978 | 2987 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
686 | 731 | | |
687 | 732 | | |
688 | 733 | | |
| |||
0 commit comments