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

GFM Tables vs List precedence #333

Open
rlidwka opened this issue May 26, 2023 · 0 comments
Open

GFM Tables vs List precedence #333

rlidwka opened this issue May 26, 2023 · 0 comments

Comments

@rlidwka
Copy link

rlidwka commented May 26, 2023

See discussion in laurent22/joplin#7858, markdown-it/markdown-it#767.

There is a parsing ambiguity in the following code:

a | b
- | -
1 | 2

It can be interpreted as a table or a list. As of now, github parses it as a list:

a | b

  • | -
    1 | 2

But GFM spec doesn't currently mention anything about list vs table precedence. I believe it should be defined in the spec, as a few people ran into this already.

Three choices here:

  1. The snippet above is a table. In this case, test should be added to spec, and cmark-gfm should be fixed.
  2. The snippet above is a list. In this case, test should be added to spec.
  3. Or this is actual undefined behavior up to implementors, so it should be clearly written in spec as such (I personally would prefer to keep those at a minimum).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant