acornjs / acorn-jsx

Alternative, faster React.js JSX parser
MIT License
648 stars 74 forks source link

"to5 processor compilation failed" when JSX contains any "/" in render method #12

Closed hugoeanogueira closed 9 years ago

hugoeanogueira commented 9 years ago

6to5 fails compiling because of the slash ("/") after a tag. This doesn't happen if we leave a space or a newline between them.

/** @jsx React.DOM */

var Component = React.createClass({
  render: function () {
    return (
      <h1>/Authenticate</h1>
    );
  }
});

React.render(<Component />, document.body);

Issue originally reported in 6to5/6to5 as issue #398. Not tested with acorn-jsx though.