mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
756 stars 138 forks source link

Should tables be allowed to interrupt a paragraph? #108

Closed mity closed 5 months ago

mity commented 4 years ago

So far we have not allowed the interruption in order to be compatible with cmark-gfm.

But https://github.com/github/cmark-gfm/issues/141 shows it has been considered a bug rather than an intended feature. (However lets maybe wait until they decide what to do about the current state when cmark-gfm detects it only for some tables.)

mity commented 4 years ago

Track also https://github.com/github/cmark-gfm/issues/180

niblo commented 4 years ago

My opinion is to not allow the interruption.

The GFM spec doesn't seem to have much to say about it from what I can see: https://github.github.com/gfm/

mity commented 4 years ago

Indeed, GFM specs does not say much about it. But the GFM extensions are all underspecified in many directions in that document. That said, cmark-gfm is de-facto the reference implementation of that specification. That's what is used on github.com and what people expect when you spell GFM. Therefore, being reasonably compatible with it even beyond the specification makes sense.

For now, I will likely keep the behavior as it is, given cmark-gfm behaves inconsistently (https://github.com/github/cmark-gfm/issues/179, https://github.com/github/cmark-gfm/issues/180). However when/if they resolve it in any reasonable and consistent way, we will then likely follow.

(Keeping the issue open as a reminder to track it.)