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] script style end parsing #6511

Merged
merged 4 commits into from
Jul 12, 2021

Conversation

tanhauhau
Copy link
Member

@tanhauhau tanhauhau commented Jul 10, 2021

continuing #5328 that allows whitespace at the script and style end tag

Before submitting the PR, please make sure you do the following

  • [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with [feat], [fix], [chore], or [docs].
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regexes allow for arbitrary content after one whitespace, so </script foo> is allowed, but I don't think it is according to the spec, so I would simplify the regex to (in the case of script for example) <\/script\s*>

@tanhauhau tanhauhau force-pushed the tanhauhau/script-style-parsing branch from efaada5 to 836c280 Compare July 10, 2021 10:26
@pngwn
Copy link
Member

pngwn commented Jul 10, 2021

Sorry i forgot again didn't i.

This looks good to go.

@tanhauhau tanhauhau merged commit 6a582af into sveltejs:master Jul 12, 2021
@tanhauhau tanhauhau deleted the tanhauhau/script-style-parsing branch July 12, 2021 14:57
@Conduitry
Copy link
Member

Released in 3.39.0.

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.

None yet

4 participants