Microsoft/TypeScript
Vedi su GitHubComment like jsx text emitted twice when preserve enabled
Open
#61.860 aperta il 13 giu 2025
BugDomain: JSX/TSXHelp Wanted
Metriche repository
- Star
- (48.455 star)
- Metriche merge PR
- (Merge medio 6g 17h) (9 PR mergiate in 30 g)
Descrizione
🔎 Search Terms
comment like jsx text, preserve jsx
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
⏯ Playground Link
💻 Code
function App() {}
const jsx = <App>/* no */{/* 1 */ 123 /* 2 */}/* no */</App>;
🙁 Actual behavior
These duplicate sections will be rendered in the JSX text output:
"use strict";
function App() { }
const jsx = <App> /* no *//* no */{/* 1 */123 /* 2 */} /* no *//* no */</App>
// ~~~~~~~ ~~~~~~~
🙂 Expected behavior
"use strict";
function App() { }
- const jsx = <App> /* no *//* no */{/* 1 */123 /* 2 */} /* no *//* no */</App>
+ const jsx = <App> /* no */{/* 1 */123 /* 2 */} /* no */</App>
Additional information about the issue
No response