Alanaktion / phproject

A high performance full-featured project management system
https://www.phproject.org
GNU General Public License v3.0
388 stars 106 forks source link

Add custom Textile-compatible table markup rendering #333

Closed Alanaktion closed 6 years ago

Alanaktion commented 7 years ago

This should be implemented as a separate config/parser option in addition to the current Markdown and Textile parsers that runs as part of the Markdown conversion when enabled. Only a minimal syntax support without alignment and other features is required. Ideally this should be implemented as an extension to Parsedown.

The following example table should be supported:

|column1 | column2 |
|row2col1|row2col2 |
|row3 col1|row3col2|

It is basically a Markdown table without the requirement of having a table header. Whitespace within the pipes should be ignored, and it can be assumed that the end pipes for each line are the first and last character with no preceding or trailing whitespace (except newlines).

Alanaktion commented 6 years ago

This is half-working right now. It only renders the second row in a table, not the first row, and not any row after the first. A bit weird, but it kind of makes sense considering how Parsedown works.

Alanaktion commented 6 years ago

...it may also be necessary to support newlines within table cells for better compatibility. This is starting to look less reasonable as a core feature so I may just cancel it.

Alanaktion commented 6 years ago

I've decided this doesn't make sense as a core feature, I'd rather limit support to a more standard Markdown superset like CommonMark or GFM.