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

Fix Table Recognition So It Does Not Match Table Rows with Just Dashes in Them #1248

Merged
merged 2 commits into from
Dec 24, 2024

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