Open rattrayalex-stripe opened 5 years ago
Both of these semantically-equivalent bits of code are broken:
<Foo x="\" y />
<Foo x={'\\'} y />
Neither is broken when another character exists between the \ and the closing quote.
\
I work around this like so:
<Foo x="\" /* " // fix syntax highlighting */ y />
It looks like strings in JSX attributes are treated the same as normal strings in JS. Not sure when I'll be able to get to this, but I can look into preventing \ escapes in these cases.
Both of these semantically-equivalent bits of code are broken:
Neither is broken when another character exists between the
\
and the closing quote.I work around this like so: