Content-Length: 277538 | pFad | https://github.com/microsoft/TypeScript/issues/61860

B9 Comment like jsx text emitted twice when preserve enabled Β· Issue #61860 Β· microsoft/TypeScript Β· GitHub
Skip to content

Comment like jsx text emitted twice when preserve enabledΒ #61860

@bvanjoi

Description

@bvanjoi

πŸ”Ž 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

https://www.typescriptlang.org/play/?jsx=1#code/GYVwdgxgLglg9mABAQQA6oBQEpEG8C+AUMRAgM5SIBWZAHogLyIA8aqAfAPQBUiYcibp1w9EARkGdxAJgDMiUdMn5R-Sc05t2AbkJA

πŸ’» 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/microsoft/TypeScript/issues/61860

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy