This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Open
Conversation
Contributor
Author
|
Pretty sure this will re-break YAML in GFM. |
3 tasks
73 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Requirements
Description of the Change
What's this? Another rewrite? This rewrite primarily introduces error highlighting to indicate when invalid YAML is being written. For example, content after a non-scalar will now be highlighted as an error, as well as non-scalar content after a scalar. Two examples follow:
Previously, both
ERRORstatements would be innocuously tokenized asstring.unquoted.yaml, when in fact they are invalid YAML.Invalid tab highlighting has also been greatly improved.
Alternate Designs
None
Benefits
It is now easy to see when invalid YAML is being written.
Possible Drawbacks
One drawback is that when writing scalars, until you finish the key name with the colon, the key will be tokenized as an error. I don't see any way of getting around this short of removing the error highlighting (it was previously tokenized as an unquoted string).
Applicable Issues
Fixes #78