rjsx-mode icon indicating copy to clipboard operation
rjsx-mode copied to clipboard

Multiline text

Open cosven opened this issue 5 years ago • 6 comments

js2-jsx-mode (multiline): image

rjsx-mode (multiline): image

rjsx-mode (one line): image

vscode (multiline): image

cosven avatar Oct 10 '18 02:10 cosven

Is multi-line text part of the JSX spec?

felipeochoa avatar Oct 12 '18 14:10 felipeochoa

I guess it is part of the spec since multiline text works in JSX, but I really don't know much about JSX spec.

cosven avatar Oct 14 '18 06:10 cosven

Looks like should be supported: https://github.com/RReverser/acorn-jsx/issues/16

ghost avatar Dec 17 '18 03:12 ghost

Hitting this bug right now, how would one go about fixing it?

Sleepful avatar Oct 10 '20 03:10 Sleepful

It would be updating rjsx-parse-single-attr to use a custom string parser for attribute values instead of relying on (js2-match-token js2-STRING) as it currently does.

felipeochoa avatar Oct 12 '20 19:10 felipeochoa

I was trying to look at how js2-mode parses multi-line strings but I couldn't figure it out https://github.com/mooz/js2-mode/blob/master/js2-mode.el#L3761 Found that code for string literals but it's confusing u_u

Sleepful avatar Oct 14 '20 06:10 Sleepful