FrontmatterExtension: Support block attributes and spaced syntax#124
Merged
dereuromark merged 1 commit intomasterfrom Mar 24, 2026
Merged
FrontmatterExtension: Support block attributes and spaced syntax#124dereuromark merged 1 commit intomasterfrom
dereuromark merged 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #124 +/- ##
=========================================
Coverage 93.92% 93.92%
- Complexity 2382 2383 +1
=========================================
Files 81 81
Lines 6303 6306 +3
=========================================
+ Hits 5920 5923 +3
Misses 383 383 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6a4d4b6 to
2a20d91
Compare
- Add consumePendingAttributes() to BlockParser for extensions to access
pending block attributes defined on preceding lines
- Support standard djot block attribute syntax: {.class} on line above
the frontmatter opener now attaches to the frontmatter block
- Remove inline attribute syntax (---yaml {.meta}) in favor of standard
djot block attributes above
Follows discussion in jgm/djot#35.
2a20d91 to
e27b71c
Compare
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
consumePendingAttributes()toBlockParserfor extensions to access pending block attributes---yaml {.meta}) in favor of standard djot block attributesNew Syntax
Block attributes are placed on the preceding line (standard djot style):
Follow-up to #122, based on discussion in jgm/djot#35.