Microsoft/TypeScript

Ternary operator breaks syntax highlighting in tsx file

Open

#56.696 aberto em 6 de dez. de 2023

Ver no GitHub
 (0 comments) (1 reaction) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: JSX/TSXHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.84.2
  • OS Version: Windows 11 build 22621

Steps to Reproduce:

  1. Create a .tsx file
  2. Paste this code
import { useState } from "react"
import './OS.css'
import Window from './Window'

const OS = () => {
    const [loaded, setLoaded] = useState(false);

    return (
        loaded ?
            <div id="OS">

            </div>
            :
            <div id="loading">
                <Window title="Starting Up">

                </Window>
            </div>
    )
}

export default OS

All editor features will be broken in the second half of the ternary operator. No tag closing, no indentation, and syntax highlighting is funky image

Guia do colaborador