-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: `yamlFrontmatter` can now be used to wrap a language with a YAML frontmatter. See https://discuss.codemirror.net/t/how-to-integrate-yaml-front-matter-in-codemirror-6-with-markdown/8092
- Loading branch information
Showing
6 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@precedence { frontmatter } | ||
|
||
@top Document { Frontmatter? Body } | ||
|
||
Frontmatter { DashLine FrontmatterContent { line* } DashLine } | ||
DashLine { !frontmatter dashLine } | ||
Body { (line | dashLine)* } | ||
|
||
@tokens { | ||
lineEnd { "\r" | "\n" } | ||
dashLine { "---" (lineEnd | @eof) } | ||
line { ![\n\r]* lineEnd | ![\n\r]+ @eof } | ||
@precedence { dashLine line } | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import {LRParser} from "@lezer/lr" | ||
export declare const parser: LRParser |
This file contains 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