-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Table rendering in parsedown #379
Comments
Closing since the result matches spec |
In the last two rows, leading '|' should've rendered first cell as blank. IMHO, Consideration comes from the reference, which is header row. If header row has leading pipe character, all rows are expected to have leading pipe. However, rows without leading pipe are rendered assuming '|' in the beginning. On the contrary, if header row does NOT have leading pipe character, any rows that have leading pipe character should render first cell as blank. |
The reason that the leading pipe is before first row is because the spec says that leading and trailing pipes are optional (but doesn't distinguish cases where some rows have this and others do not).
https://github.github.com/gfm/#tables-extension- You could try opening an issue over at https://github.com/github/cmark/issues to discuss a spec change. GitHub will also be able to get some metrics on whether changes would break too many existing texts (for example if we include a leading pipe in the header, and then require one in subsequent rows this would cause a subset of valid tables to no longer render). |
I agree on the github markdown specs part.
However, I use markdown extra parser by Michel Fortin, which practices the
behavior I requested.
https://michelf.ca/projects/php-markdown/extra/#table
In addtion, online editors like the following, demonstrate same behavior.:
https://pandao.github.io/editor.md/en.html
This could be a variable controlled behavior. For users like me with
thousands of markdown
pages, this is a deal breaker. This use case is not explicitly documented
and I am slowly
moving away from it.
…On Mon, Apr 2, 2018 at 11:14 AM, Aidan Woods ***@***.***> wrote:
The reason that the leading pipe is before first row is because the spec
says that leading and trailing pipes are optional (but doesn't distinguish
cases where some rows have this and others do not).
[...] A leading and trailing pipe is also recommended for clarity of
reading, and if there’s otherwise parsing ambiguity.
https://github.github.com/gfm/#tables-extension-
You could try opening an issue over at https://github.com/github/
cmark/issues to discuss a spec change. GitHub will also be able to get
some metrics on whether changes would break too many existing texts (for
example if we include a leading pipe in the header, and then require one in
subsequent rows this would cause a subset of valid tables to no longer
render).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#379 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGYoe_UqnrnSOuuCPuyShz_QAyQeiUAbks5tkmqUgaJpZM4HH32i>
.
|
Following table render nicely in PHP MarkdownExtra that I use from Michael F.. However, with Parsedown, this produces table that is missing empty cells. While this behavior can be justified in tbody row 1, it cannot be justifed in row 3 and row 4, where table cell(s) shifted to the left, hence losing column alignment. Please consider addressing this.
Above markdown code is also expected to work the same, even with extra leading pipes.
Ideally, I would like a completely balanced table, with all rows have same number of columns.
The text was updated successfully, but these errors were encountered: