Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables should always have at least one heading row #4

Closed
jackycute opened this issue Jan 18, 2018 · 0 comments
Closed

Tables should always have at least one heading row #4

jackycute opened this issue Jan 18, 2018 · 0 comments

Comments

@jackycute
Copy link

jackycute commented Jan 18, 2018

Hi @domchristie
I've been using this project for a long time, it's awesome!
Thank you for creating this and please keep work on.
Really looking forward to this project 😄

Back to this issue.
GFM tables need at least one heading row syntax to make a table.
But current parser would only parse the heading row in some situation. (https://github.com/domchristie/turndown-plugin-gfm/blob/master/src/tables.js#L55)
So I would propose to you that make the export table markdown always have at least one heading row even the original HTML doesn't meet the rules.

For example:

<table>
  <tr>
    <td>1</td>
    <td>2</td>
  </tr>
  <tr>
    <td>3</td>
    <td>4</td>
  </tr>
</table>

Will result:

| 1 | 2 |
|---|---|
| 3 | 4 |

Thank you very much!

NogsMPLS pushed a commit to NogsMPLS/turndown-plugin-gfm that referenced this issue Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant