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 misaligned line number in sourcemap (#3906) #4738

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

nomnomnomnom
Copy link
Contributor

Fixes issue #3906. Sourcemaps line numbers for every <script> start at line 1, even when the script is lower in the file. E.g.

<!-- Some comment
and more
and more details -->
<script>
  ...
</script>

and

<script context="module">
  // correct sourcemap
  ...
</script>
<script>
  // incorrect sourcemap
  ...
</script>

The two examples above are (approximately) the two tests included in this PR. Both tests fail prior to applying the fix and pass afterwards.

@Conduitry Conduitry merged commit cf72b41 into sveltejs:master Apr 28, 2020
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
Development

Successfully merging this pull request may close these issues.

2 participants