Skip to content

HTML fragments are being ignored #32

Open
@andrewkolesnikov

Description

@andrewkolesnikov

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions