-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: parser error when using semicolon inside quotes in style #10221
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
209f022
fix error when using semicolon inside quotes in style
rogeriolaa 2be35cd
refactor to include { like in the original code
rogeriolaa 6fc7fe6
simplified version of regex
rogeriolaa ab8c66d
add changeset
rogeriolaa db95220
add changeset
rogeriolaa 1726a1c
add test
rogeriolaa 6faac2f
Update .changeset/seven-hornets-smile.md
rogeriolaa 0535043
undo demo.css change
rogeriolaa dbf8078
fix support-font-face test not passing
b845535
add double quotes
rogeriolaa ff80c53
Merge branch 'main' into pr/10221
Rich-Harris 62ea94f
beef up test
Rich-Harris fddaad3
robustify parsing
Rich-Harris a7226db
Update .changeset/seven-hornets-smile.md
Rich-Harris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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 think the extra complexity here isn't needed — just checking that it doesn't end with a quote would be sufficient. Also don't forget the
"character.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.
Sorry about testing, I'm starting in this world of contributing to open source now and even don't know how I would write a test for that.
As for the changeset, is there a style guide or other PR that I could use as example ?
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.
No worries! The test case for this should be added in parser-modern. You can read more about contributing to Svelte here.
Unfortunately, I can't help you add a test case as I don't have write access to this PR. You can look at similar tests inside parser-modern though to understand how it works. In short, it is a snapshot test, meaning it takes an input and expects a certain output, if the generated output is different than the expected it fails.
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.
@navorite added a changeset and commited your sugestion. as for tests I'm still stucked