turndown-plugin-gfm icon indicating copy to clipboard operation
turndown-plugin-gfm copied to clipboard

A table without a header will fail to convert

Open LinFeng1997 opened this issue 5 years ago • 3 comments

For Example:

<table>
    <thead>
        <tr>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>content</td>
        </tr>
    </tbody>
</table>

will to be:

| content |

I hope this:

|  |
|--- |
| content |

LinFeng1997 avatar Mar 06 '19 07:03 LinFeng1997

"+" for issue And also, a table without thead (for example from tiptap) - will fail too. E.g.:

<table>
    <tbody>
        <tr><th><p>Header1</p></th><th><p>Header 2</p></th></tr>
        <tr><td><p>1</p></td><td><p>2</p></td></tr>
    </tbody>
</table>

will be converted as:

| 
Header1

 | 

Header 2

 |
| --- | --- |
| 

1

 | 

2

 |

Tilesto avatar Mar 25 '21 10:03 Tilesto

I proposed a pull request #31 that fixes both issues

guyplusplus avatar Apr 21 '21 14:04 guyplusplus

Has this ever been fixed?

VividVisions avatar Dec 29 '23 22:12 VividVisions