withastro / compiler

The Astro compiler. Written in Go. Distributed as WASM.
Other
503 stars 59 forks source link

Maintain whitespace before tag close #822

Closed natemoo-re closed 1 year ago

natemoo-re commented 1 year ago

Changes

Testing

Two tests added

Docs

N/A, bug fix only

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: a889dd87eb88b4ff90fcd17d363ac398f4324362

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @astrojs/compiler | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

natemoo-re commented 1 year ago

Great question @Princesseuh! I just pushed a change to make the mapping a bit more clear for that case—that one space technically gets mapped back to the whole block of spaces in the source file. I think TypeScript should handle this just fine, but we can adjust if that's not the case.