-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
When tables extensions are enabled, any extra trailing spaces on any line in the following input should not cause that we treat it as a paragraph with a hard-break on that line.
Yet, if you place two spaces at the end of the 1st line, it does happen.
So this is ok:
$ printf 'foo|bar\n---|---\nfoo|bar' | ./pulldown-cmark -T
<table><thead><tr><th>foo</th><th>bar</th></tr></thead><tbody>
<tr><td>foo</td><td>bar</td></tr>
</tbody></table>
but the following is not:
$ printf 'foo|bar \n---|---\nfoo|bar' | ./pulldown-cmark -T
<p>foo|bar<br />
---|---
foo|bar</p>
(I would expect the same output as before.)
Ditto if the hard-break is denoted with a backslash:
$ printf 'foo|bar\\\n---|---\nfoo|bar' | ./pulldown-cmark -T
<p>foo|bar<br />
---|---
foo|bar</p>
(I would expect the backslash is seen as a literal backslash, which becomes part of the respective table cell.)
Rationale: Hard-break is an inline, while table is a block. See https://spec.commonmark.org/0.29/#precedence
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels