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

Style tags that were not at top level were missing end attribute #5487

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

ehrencrona
Copy link
Contributor

@ehrencrona ehrencrona commented Oct 2, 2020

If a style tag was not at the top level, the end property of it was empty. This is because the line element.end = parser.index; was missing for the style case in that changed code.

This fixes sveltejs/language-tools#586 and (very likely) fixes sveltejs/prettier-plugin-svelte#149

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
  • 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

"children": [
{
"start": 13,
"end": 28,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

before the code change, this was null

@Conduitry Conduitry merged commit aa759f4 into sveltejs:master Oct 2, 2020
@Conduitry
Copy link
Member

Good catch, thank you! And now also with less code

@Conduitry
Copy link
Member

This has been released, thank you!

taylorzane pushed a commit to taylorzane/svelte that referenced this pull request Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants