You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following test fails, probably because it's fed to innerHTML.
it('should handle tr, td tags', function() {
var converter = new HTMLtoJSX({ createClass: false });
expect(converter.convert('<tr><td>foo</td></tr>').trim())
.toBe('<tr><td>foo</td></tr>');
});
Fails with: Expected '<div> foo </div>' to be '<tr><td>foo</td></tr>'.
Consequently, tons of HTML fragments won't be converted correctly, e.g. <table><tr><td>foo</td></tr></table> becomes <table><tbody><tr><td>foo</td></tr></tbody></table>
The text was updated successfully, but these errors were encountered:
Daniel15, is this project ever going to be able to match HTML 1:1? Could you ever ensure a ~100% compatibility with HTML5? Does React/JSX have full coverage over everything you can do in normal HTML?
When I used this on a few sites, I would often get HTML syntax errors (akin to #9). Is that due to an incompatibility or just a buggy parser that could be fixed if enough time was put into it?
@karlfloersch - What issues have you encountered? Concrete examples would be great, ideally one separate issue per issue to allow for better tracking 😄 JSX should allow most HTML tags except for deprecated tags, and hence the converter should also support them.
The following test fails, probably because it's fed to innerHTML.
Fails with:
Expected '<div> foo </div>' to be '<tr><td>foo</td></tr>'.
Consequently, tons of HTML fragments won't be converted correctly, e.g.
<table><tr><td>foo</td></tr></table>
becomes<table><tbody><tr><td>foo</td></tr></tbody></table>
The text was updated successfully, but these errors were encountered: