acornjs / acorn-jsx

Alternative, faster React.js JSX parser
MIT License
646 stars 72 forks source link

Allow multiline JSX string attributes. #17

Closed vanwagonet closed 9 years ago

vanwagonet commented 9 years ago

Preserves whitespace in Literal node. Official JSX Grammer allows anything up until the ending quote, including newlines. Fixes #16.

vanwagonet commented 9 years ago

Transpiled code may not look as close to the original, but the net effect is the same as JSX Transformer.

sebmck commented 9 years ago

Don't think the string normalisation should be taking place on the parser level.

vanwagonet commented 9 years ago

k, I will update.

sebmck commented 9 years ago

@thetalecrafter Wait for @RReverser to chime in, I'm not fussed.

vanwagonet commented 9 years ago

Naw, I think you're right. Normalization isn't a parser op, it's something best left to a transforming layer.

sebmck commented 9 years ago

@thetalecrafter Merged into acorn-6to5 thanks!

RReverser commented 9 years ago

LGTM. Thanks @thetalecrafter!

vanwagonet commented 9 years ago

\o/