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

Better Table Parsing #694

Merged
merged 4 commits into from
Apr 21, 2023
Merged

Better Table Parsing #694

merged 4 commits into from
Apr 21, 2023

Conversation

pjkaufman
Copy link
Collaborator

Fixes #652
Fixes #597

The regex table parsing logic was a little too complex and could cause performance issues. Thus it was replaced with a different parser that starts by identifying the table separator row and validates that it has no text earlier on the line, that there is an actual line before it, and that all cells in the separator row have at least one dash in it. Then it verifies that the separator row is not three dashes that has a line of text since that is either YAML or a header. Once that is done, it grabs any rows that may exist after the table separator row.

Changes Made:

  • Updated the table parsing logic
  • Added UTs for the table parsing
  • Added a UT for the paragraph blank lines issue

@pjkaufman pjkaufman added bug Something isn't working markdown General Markdown or Markdown related issue or feature labels Apr 21, 2023
@pjkaufman pjkaufman self-assigned this Apr 21, 2023
@pjkaufman pjkaufman merged commit 4b1fe35 into platers:master Apr 21, 2023
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: Malformed Table Hangs Linter Bug: Linter breaks callout with table inside
1 participant