riazXrazor / html-to-jsx

Converts html code to React JSX
MIT License
26 stars 7 forks source link

bug (or Unimplemented) about table tag converting #1

Open shinriyo opened 6 years ago

shinriyo commented 6 years ago

Hello It is amazing concept extension.

But, I tried this to convert

          <thead>
            <tr>
              <th colspan="123">
                HOGE
              </th>
              <th rowspan="3" colspan="14">
                BAR
              </th>
            </tr>
          </thead>

but, it is converted result

<div>
  HOGE
  BAR
</div>

but my estimated result is

          <thead>
            <tr>
              <th colSpan={123}>
                HOGE
              </th>
              <th rowSpan={3} colSpan={14}>
                BAR
              </th>
            </tr>
          </thead>

I hope fix or implement the feature

riazXrazor commented 6 years ago

@shinriyo please try enclosing it with a table

<table>
 <thead>
            <tr>
              <th colspan="123">
                HOGE
              </th>
              <th rowspan="3" colspan="14">
                BAR
              </th>
            </tr>
          </thead>
</table>

it should work. till then i will look into it and try to get it fixed

shinriyo commented 6 years ago

@riazXrazor

Thank you for response. It worked.

However, some attribute likealign, valign and width weren't converted.