vscode-mdx icon indicating copy to clipboard operation
vscode-mdx copied to clipboard

Correctly apply comments for JSX

Open silvenon opened this issue 6 years ago • 1 comments

When commenting a line using + /, top-level JSX:

<Foo />

should turn into Markdown comments:

<!-- <Foo /> -->

and commenting content inside a JSX tag:

<Foo>
  <Bar />
</Foo>

should turn into JSX comments:

<Foo>
  {/* <Bar /> */}
</Foo>

silvenon avatar Jan 29 '19 23:01 silvenon

The latter case works now, but the first case still doesn't, and it's very tricky because it's JSX until it's commented, then it becomes treated as Markdown. 😓

silvenon avatar Jan 22 '20 20:01 silvenon