Andreas Svensson
Andreas Svensson
> Exactly. That's why I proposed preserving whitespaces on parser level AFAIK it is preserved by the parser, it's the JSX transform that strips it. Although we discussed (and actually...
@garthk I'm not a fan of whitespace rules for text at all, to lend some more context #28 (and #8 #35). > ... would come if we preserved whitespace for...
@cancerberoSgx JSX inline strings IMHO are only really well-suited to small snippets of text/labels. If you want something more specific or extensive then I recommend putting it all into a...
> Imagine the user is authoring a book, or article or news paper and is forced to use strings or attribtues for that !!!. JSX.TextNode is the natural way of...
@nik72619c That is correct, all lines are trimmed. Since there are no wrapping elements in the second example the whitespace at the end gets trimmed. Here's the explanation of the...
@nik72619c Anything really, simply put, like the explanation says, leading and trailing white-space is trimmed (from the point-of-view of the source code lines). So white-space that is surrounded by **anything**...
_Sorry for the tl;dr and loosly structured thoughts, but I hope most of what I'm trying to convey/play with is understandable._ #8 sums up some of my thoughts on it...
Might it make sense to relax the delimiting rules so that `,` is implied for newlines instead (if the expression can be terminated), similar to statements in JS, and then...
@tolmasky Remember that JSX has nothing to do with HTML, XML maybe. HTML is only one possible outcome, you have ReactNative and a host of other renderers which has nothing...
@gajus It's not equivalent though, you're including indentation and newlines.