Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline text #88

Open
cosven opened this issue Oct 10, 2018 · 6 comments
Open

Multiline text #88

cosven opened this issue Oct 10, 2018 · 6 comments
Labels

Comments

@cosven
Copy link

cosven commented Oct 10, 2018

js2-jsx-mode (multiline):
image

rjsx-mode (multiline):
image

rjsx-mode (one line):
image

vscode (multiline):
image

@felipeochoa
Copy link
Owner

Is multi-line text part of the JSX spec?

@felipeochoa felipeochoa changed the title not working well with multiline text Multiline text Oct 12, 2018
@cosven
Copy link
Author

cosven commented Oct 14, 2018

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

@ghost
Copy link

ghost commented Dec 17, 2018

Looks like should be supported: acornjs/acorn-jsx#16

@Sleepful
Copy link

Sleepful commented Oct 10, 2020

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

@felipeochoa
Copy link
Owner

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.

@Sleepful
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants