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

Table body with missing data when markdown is padded #199

Closed
skyghis opened this issue Feb 2, 2021 · 3 comments · Fixed by #200
Closed

Table body with missing data when markdown is padded #199

skyghis opened this issue Feb 2, 2021 · 3 comments · Fixed by #200
Labels

Comments

@skyghis
Copy link

skyghis commented Feb 2, 2021

Table rendering changed after version 0.15.2.

For table (note spaces on the left of the table):

  | Col 1 | Col 2 | Col 3 |
  |-------|-------|-------|
  | A1 | B1 | C1 |

With version 0.15.2 I get expected :

<table>
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>A1</td>
<td>B1</td>
<td>C1</td>
</tr>
</tbody>
</table>

But with versions 0.16.1 and 0.17.0 I get a table with first column empty and last column missing:

<table>
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>A1</td>
<td>B1</td>
</tr>
</tbody>
</table>

Without spaces on the left of the Markdown table, the HTML is correct.

@skyghis skyghis added the bug label Feb 2, 2021
@robinst
Copy link
Collaborator

robinst commented Feb 3, 2021

Yep, that's a bug! Will fix ASAP.

robinst added a commit that referenced this issue Feb 3, 2021
This bug is present in 0.16.1 and 0.17.0 and was introduced with the
source span refactorings.

Fixes #199.
@robinst
Copy link
Collaborator

robinst commented Feb 4, 2021

Fixed and released 0.17.1 with the fix: https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md#0171---2021-02-03

Thanks for reporting!

@skyghis
Copy link
Author

skyghis commented Feb 4, 2021

Thank you for this fast fix and release 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants