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/list parsing ambiguity #767

merged 2 commits into from Mar 27, 2021


Copy link

@hukkin hukkin commented Mar 26, 2021

Fix parsing of

a | b
- | -
1 | 2

Markdown-it parses it as a table, but it should not be one, because there is a list on the second line that intercepts the table.

The GFM spec says:

A leading and trailing pipe is also recommended for clarity of reading, and if there’s otherwise parsing ambiguity.

Also GitHub's own parser parses this as a list, not a table.

@puzrin puzrin merged commit cd5296f into markdown-it:master Mar 27, 2021
2 checks passed
@hukkin hukkin deleted the table-ambiguity branch Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants