Skip to content

Conversation

@pjkaufman
Copy link
Collaborator

Fixes #1235

There was an issue reported around tables getting messed up if some of the rows were filled with hyphens/dashes. This was caused by looking for the separator row and not checking that two lines prior was not also a part of the table. So I added that check to see if the line two lines prior either started or ended with |. If it does, then we know that it is a table row and we will skip this as a table addition. This seems to allow the table recognition logic to work for this scenario.

Changes Made:

  • Added UTs for the table recognition and the adding of blank lines around the table
  • Updated the table recognition code to check two lines prior to the potential separator line to see if it is a part of the table as well and skip that potential separator if it is a part of the table

@pjkaufman pjkaufman added bug Something isn't working markdown General Markdown or Markdown related issue or feature labels Dec 24, 2024
@pjkaufman pjkaufman self-assigned this Dec 24, 2024
@pjkaufman pjkaufman merged commit f744752 into platers:master Dec 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working markdown General Markdown or Markdown related issue or feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Empty Line Around Tables breaks table when cell values are hyphens

1 participant