-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent <Markdown> blocks from locking up vscode extension #269
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this works, I'm all for it!
I think this also fixes an issue where </Markdown>
without any leading space would not be highlighted.
"begin": "(?:^\\s+)?(<)(Markdown)\\b(?=[^>]*)", | ||
"name": "text.html.astro.markdown", | ||
"begin": "(<)(Markdown)(>)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate how straightforward this is, but does this preclude us from exposing props in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try and add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a huge deal, we can cross that bridge when we get there. That was the intent of the #tag-stuff
include, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the reason why I simplified it was because the old way was causing the end tag to not be highlighted when there were no children and I could figure out what caused it. Might just leave it this simple way for now and expand later.
We shouldn't have to define that a Markdown behaves like a normal element though, we should get that for free, so there might be an issue with ordering going on (or we might need to switch to lookbehinds/lookaheads so that it only cares about the inside of Markdown tags)
Changes
Simplifies the grammar a little and gets rid of a block that was causing infinite recursion.
Testing
Docs