Closed kendagriff closed 7 years ago
How about when you escape the apostrophe as in
<Header> You\'s is my name.</Header>
Still the same. Perhaps it's a plugin conflict?
Just double-quote the whole raw string. Handling raw strings with single quotes is unsupported at present.
Sorry, why was this closed? Double-quoting the raw string would cause the double quotes to appear in the final HTML. You said it's "unsupported at present" - isn't that exactly why you'd want to keep it open?
@richardfickling—When I implemented the syntax file, I pointedly made it so that quoted strings were highlighted as JS strings when they were the children of JSX nodes. I think it used to be the case that string literal children would be interpreted as string literals, rather than having their surrounding quotes escaped and made part of the string... either this was never the case, or it is no longer the case.
Supporting both string-literals-as-children and quotes-embedded-in-bare-strings was a wontfix, but since the former is no longer correct, the fix is easy—I'll have it up shortly.
Seeing the same results (with the latest master
) as @kendagriff's screenshots when apostrophe characters are used -- could this be reopened?
Whoops, I didn't actually mean to reopen this. I can't repro; can you read the README and then take the outlined steps?
Sorry for the noise, it was a conflict between setting filetype; my vimrc set it and vim-jsx
sets it too.
Syntax gets goofed up when using apostrophes: