Skip to content
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

Merged
merged 1 commit into from
May 28, 2021
Merged

Conversation

matthewp
Copy link
Contributor

Changes

Simplifies the grammar a little and gets rid of a block that was causing infinite recursion.

Testing

  • Tests are passing
  • Tests updated where necessary

Docs

  • Docs / READMEs updated
  • Code comments added where helpful

@changeset-bot
Copy link

changeset-bot bot commented May 28, 2021

⚠️ No Changeset found

Latest commit: 0c16cd6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@natemoo-re natemoo-re left a 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.

Comment on lines -717 to +718
"begin": "(?:^\\s+)?(<)(Markdown)\\b(?=[^>]*)",
"name": "text.html.astro.markdown",
"begin": "(<)(Markdown)(>)",
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants