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

fix(tokenizer): handle unterminated quoted attributes gracefully #923

Merged
merged 12 commits into from
Jan 4, 2024

Conversation

MoustaphaDev
Copy link
Member

@MoustaphaDev MoustaphaDev commented Dec 22, 2023

Changes

Fix an issue where unterminated quoted attributes caused the compiler to crash

Testing

Added a TSX output test to make sure the compiler doesn't crash

Docs

N/A bug fix

This comment was marked as outdated.

@Princesseuh
Copy link
Member

The crash only happened in the AST printing. Could a test be added for that too?

@MoustaphaDev
Copy link
Member Author

Sure, I'll add that

@MoustaphaDev

This comment was marked as outdated.

This comment was marked as outdated.

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.

This is great!

internal/token.go Show resolved Hide resolved
internal/token.go Show resolved Hide resolved
@MoustaphaDev

This comment was marked as outdated.

@MoustaphaDev
Copy link
Member Author

Tests should pass after merging #932

@MoustaphaDev MoustaphaDev merged commit b52f7d1 into main Jan 4, 2024
5 checks passed
@MoustaphaDev MoustaphaDev deleted the fix-jsx-attr-issue branch January 4, 2024 18:38
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.

🐛 BUG: Unbalanced quotes in HTML attributes crashes compiler when parsing AST
3 participants