microsoft / microsoft/TypeScript
Comment like jsx text emitted twice when preserve enabled
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
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
https://www.typescriptlang.org/play/?jsx=1#code/GYVwdgxgLglg9mABAQQA6oBQEpEG8C+AUMRAgM5SIBWZAHogLyIA8aqAfAPQBUiYcibp1w9EARkGdxAJgDMiUdMn5R-Sc05t2AbkJA
### 💻 Code
```tsx
function App() {}
const jsx = /* no */{/* 1 */ 123 /* 2 */}/* no */;
```
### 🙁 Actual behavior
These duplicate sections will be rendered in the JSX text output:
```jsx
"use strict";
function App() { }
const jsx = /* no *//* no */{/* 1 */123 /* 2 */} /* no *//* no */
// ~~~~~~~ ~~~~~~~
```
### 🙂 Expected behavior
```diff
"use strict";
function App() { }
- const jsx = /* no *//* no */{/* 1 */123 /* 2 */} /* no *//* no */
+ const jsx = /* no */{/* 1 */123 /* 2 */} /* no */
```
### Additional information about the issue
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con il TypeScript Playground collegato e il riproduttore TSX usando la gestione di preserve JSX. Confronta il testo JSX emesso con l’output previsto: ogni commento /* no */ dovrebbe comparire una volta anziché essere duplicato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100