jridgewell / babel-plugin-transform-incremental-dom

Turn JSX into IncrementalDOM
MIT License
145 stars 12 forks source link

Spaces are not handled as in HTML on linebreaks #41

Closed lanthaler closed 8 years ago

lanthaler commented 8 years ago

In https://github.com/lanthaler/induxco/blob/master/index.tsx#L57 ([Chrome-only demo) I have a link in a paragraph:

<p>This project is a demo addressing the problem raised at
  <a href="https://github.com/slorber/scalable-frontend-with-elm-or-redux">slorber/scalable-frontend-with-elm-or-redux</a>
  with a combination of Redux, Incremental DOM, and Web Components (Polymer).</p>

I placed it on a new line to keep the line shorter. When rendering, the plugin strips all the whitespace around the a tag so that the resulting string is atslorber/scalable-frontend-with-elm-or-reduxwith instead of at slorber/scalable-frontend-with-elm-or-redux with as one would expect from HTML.