Add fenced comment block support (%%%)#124
Open
dereuromark wants to merge 1 commit into
Open
Conversation
Add block-level comment syntax using three or more percent signs as
fenced delimiters. Content between the fences is completely discarded
and does not appear in the rendered output.
Unlike inline comments ({% %}), fenced comment blocks can contain
blank lines, making them suitable for commenting out larger sections.
- Add fenced_comment block spec in block.ts with fence matching
- Add +comment/-comment event handlers in parse.ts that discard content
- Add test cases covering basic usage, blank lines, longer fences,
fence length matching, and unclosed comments
Companion spec PR: jgm/djot#376
Owner
|
I'm not sold yet on fenced comment blocks. |
Contributor
Author
|
https://php-collective.github.io/djot-php/guide/syntax.html#comments Here is an overview of the different kind, and why it is useful and probably important to allow such multi line ones incl newlines for visual separation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
%%%(3+ percent signs) as delimiters%as the opening fence{% %}), fenced comment blocks can contain blank lines→
<p>Before.</p><p>After.</p>Companion spec PR: jgm/djot#376
A reference implementation exists in djot-php.