Skip to content

Table Markdown Survey

Janek Bogucki edited this page Jul 6, 2017 · 1 revision

Survey of Candidate Markdown to use for Scaladoc Tables

  1. Review table syntax of all LMLs on: https://en.wikipedia.org/wiki/Lightweight_markup_language
  2. DONE: Explore options to make MediaWiki vertical syntax optionally extend horizontally to support source code documentation reading
  3. MediaWiki support cell definition in the same line by using || separators

GitHub

https://help.github.com/articles/organizing-information-with-tables/

Structure Definition Column Alignment Header Definition
Pipes and hyphens Mnemonic colons and hyphens Extra Markdown Line

Comments

Can be difficult to get table structure correct at first requiring iteration which will not work well with a lengthy Scaladoc creation cycle.

Requires the line after the opening line to synchronized in terms of the number of cells. Failure to do so results in a failure to style the table. This non-local consistency requirement has the potential to inflate the edit-build-review cycle or, worse, result in silent non-rendering left for the user to encounter.

Confluence

https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html#ConfluenceWikiMarkup-Tables

Structure Definition Column Alignment Header Definition
Pipes and double pipe n/a Inline double pip

Comments

Easy to use. Supports header cells in rows or columns. Has a second type of table definition using {section} and {column} tags which is more like markup than markdown.

Kramdown

https://kramdown.gettalong.org/syntax.html#tables

Structure Definition Column Alignment Header Definition
Pipes, hyphens, pluses and equals Mnemonic colons and hyphens Extra Markdown Line

Comments

Also supports footers

Redcarpet

TODO: Find out what redcarpet parses

Structure Definition Column Alignment Header Definition

Pandoc

Four styles of table definition: http://pandoc.org/MANUAL.html#tables

Type Description
simple_tables Column membership is based on lining up the source text.
multiline_tables As simple_tables but allowing multiline cell content by wrapping to imaginary cell edges.
grid_tables Full definition of cell edges using hyphens, pipes and equals signs.
pipe_tables PHP Markdown Extra Tables, essentially pipes and hyphens without restrictions to requiring a fixed width layout.

Comments

Heavy on either alignment via whitespace management or full depiction of table cell edges with text.

Creole

http://www.wikicreole.org/wiki/Tables

TODO: Review

MediaWiki

https://www.mediawiki.org/wiki/Help:Tables

http://www.tablesgenerator.com/mediawiki_tables

TODO: Review TODO: Look up MediaWiki specification. TODO: How to span columns

Comments

Selected

Has a low maintenance vertical layout. The use of a delimited vertical block would make parsing less complex than a pipes format.

This is a very attractive option. MediaWiki appears to be the progenitor of the markdown style used in Scaladoc. This is also hinted at by the name of the parser: WikiParser.

MediaWiki markdown for text styling and headers appears on brief inspection to be the same as Scaladoc. It's likely Scaladoc markdown originates from MediaWiki. Certainly Scaladoc markdown is sometimes called wiki markdown.

The layout disconnect between the definition and rendering makes reading the table in the source code awkward, however so does the use of @define macros and @usecase to a lesser extent. However MediaWiki allows same line definition of cells using || as a separator so MediaWiki supports both definition modes (vertical and planar).

PmWiki

http://www.pmwiki.org/wiki/PmWiki/Tables

Comments

Has compact syntax for spanning columns using an empty cell