Skip to content

unexpected behavior on empty html table cell #2718

Closed
amueller opened this Issue · 1 comment

1 participant

@amueller

I tried to convert

<table>
    <tr>
      <th></th>
      <th>age</th>
      <th>workclass</th>
    </tr>
    <tr>
      <th>0</th>
      <td>39</td>
      <td>State-gov</td>
    </tr>
</table>

to a github pipe table with pandoc blub.html --to markdown_github.
However, that resulted in html output.
When I explicitly put a space into the first cell:

<table>
    <tr>
      <th>&nbsp;</th>
      <th>age</th>
      <th>workclass</th>
    </tr>
    <tr>
      <th>0</th>
      <td>39</td>
      <td>State-gov</td>
    </tr>
</table>

I got the expected result:

|     | age | workclass |
|-----|-----|-----------|
| 0   | 39  | State-gov |

This seems like a bug to me.

@jgm jgm closed this in b8dadc6
@amueller

thanks, that was quick!

@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm HTML reader: properly handle an empty cell in a simple table.
Closes #2718.
cfe0d97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.