We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@astrojs/compiler
1.3.2
pnpm
macOS
Multilines comments seems to not be handled properly, they move around, disappear.. real magicians over there.
For instance, the following code:
{/* @ts-expect-error */} <Component prop="value"></Component> { // @ts-expect-error } <Component prop="value"></Component> { /* @ts-expect-error */ <Component prop="value"></Component> } { // @ts-expect-error <Component prop="value"></Component> }
Becomes this TSX:
<Fragment> <Component prop="value"></Component> { // @ts-expect-error } <Component prop="value"></Component> { /* @ts-expect-error */<Fragment><Component prop="value"></Component></Fragment>} { // @ts-expect-error <Fragment><Component prop="value"></Component></Fragment>} </Fragment>
For the average comment, this doesn't really matter. However, it matters for TS pragmas, as their position is important.
See description
The text was updated successfully, but these errors were encountered:
Would you expect this to be the correct output?
<Fragment> <Component prop="value"></Component> <Component prop="value"></Component> { /* @ts-expect-error */ <Fragment><Component prop="value"></Component></Fragment> } { // @ts-expect-error <Fragment><Component prop="value"></Component></Fragment> } </Fragment>
Sorry, something went wrong.
I would expect all forms to maintain their shape, so the following would be the optimal result:
<Fragment> {/* @ts-expect-error */} <Component prop="value"></Component> { // @ts-expect-error } <Component prop="value"></Component> { /* @ts-expect-error */ <Fragment><Component prop="value"></Component></Fragment> } { // @ts-expect-error <Fragment><Component prop="value"></Component></Fragment> } </Fragment>
MoustaphaDev
Successfully merging a pull request may close this issue.
What version of
@astrojs/compiler
are you using?1.3.2
What package manager are you using?
pnpm
What operating system are you using?
macOS
Describe the Bug
Multilines comments seems to not be handled properly, they move around, disappear.. real magicians over there.
For instance, the following code:
Becomes this TSX:
For the average comment, this doesn't really matter. However, it matters for TS pragmas, as their position is important.
Link to Minimal Reproducible Example
See description
The text was updated successfully, but these errors were encountered: