Skip to content

TypeScript syntax highlighting is broken when using backticks and equals signs on a single line #48857

@niieani

Description

@niieani
  • VSCode Version: 1.23-0-insider
  • OS Version: macOS

screen shot 2018-04-27 at 22 00 15

Steps to Reproduce:

  1. Enter the following code in a .ts file:
const example = () => (
  {example: "`x=y`"} // everything after this line is highlighted like a string
)

const brokenHighlighting = true

Interestingly, the same issue occurs with:

const example = () => (
  {example: `x=y`} // everything after this line is highlighted like a string
)

const brokenHighlighting = true

But it does not occur when the preceding bracket ( is on the same line as {:

const example = () => ({
  example: "`x=y`"
})

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

This does not occur in latest stable v1.22.2, so this is a regression.

Metadata

Metadata

Assignees

Labels

grammarSyntax highlighting grammarjavascriptJavaScript support issuestypescriptTypescript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions