-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #84 - Added YAML support - Also updated the DOM rendering bits to use markdown instead of setting the HTML directly, which is a safer approach - Also slightly improved the demo UI (it didn't look good with black text on black background) - Also added a bunch of tests To support YAML (and potentially other formats), I updated the logic to "resolve" tokens before using them. This is important since the [YAML grammar/tokens](https://github.com/lezer-parser/yaml/blob/main/src/yaml.grammar) is different from the [JSON grammar/tokens](https://github.com/lezer-parser/json/blob/main/src/json.grammar) (which is very similar to the [JSON5 grammar](https://github.com/dimfeld/lezer-json5/blob/master/src/json5.grammar)). So we map the tokens from the different grammars to the equivalent token in the "base" grammar (currently this is the JSON grammar tokens but I think we can/should map to some other arbitrary token set which will force us to properly implement the mappings, otherwise additional changes made may work in JSON mode but without proper testing, may not work in YAML mode, if the mappings were not added).
- Loading branch information
Showing
39 changed files
with
2,164 additions
and
728 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"codemirror-json-schema": minor | ||
--- | ||
|
||
Added YAML support, switched back to markdown for messages, provide markdown rendering, and fix some autocompletion issues |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.