Replies: 1 comment 2 replies
-
|
The GFM spec isn’t clear on whether tables can interrupt a paragraph, which has led to some confusion. Some platforms require an empty line before a table, while others allow it to follow a paragraph with just a line break. To fix this, the GFM spec could clarify whether blocks like tables need to be separated by an empty line, unless it's explicitly stated that they can interrupt. This would help create more consistency across different implementations. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
GFM tables interrupting paragraph
Unclear if this is allowed in the current GFM (GitHub Flavored Markdown) specification.
Explanation
On GitHub Flavored Markdown (GFM) spec most block items make it clear if they can "interrupt a paragraph". However, this is not made clear for the table extension. This brings the issue that some implementations decide that an empty line before a table is required, while other implementations allow that e.g. an (otherwise undefined) "title" - or any other text - could be on top of the table. For instance, the preview function on StackExchange does render a table if it follows text after a single line break, but once posted the table won't be rendered correctly.
As the GitHub specification seems to have been created to avoid such unclarities I propose first that any block should be separated from a paragraph by an empty line, unless it is made explicit that a block can "interrupt a paragraph". In my opinion either section 3 or 4 should make it clear what is meant by interrupting a paragraph and why this is not permitted by default.
Above is just my idea of handling the situation of course, other possibilities exist. But I think that a solution should be found; just indicating what is required for a table definition should be the minimum change of the specification.
Beta Was this translation helpful? Give feedback.
All reactions