showdown
showdown copied to clipboard
[GFM] Table delimiter row requires more than one `-` in each cell.
Does not support table
showdown.setOption('tables', true);
showdown.setOption('tablesHeaderId', true);
var converter = new showdown.Converter(),
text = `|a|b|c|d|
|:-|:-:|:-:|-:|
|1|2|3|4|`,
html = converter.makeHtml(text);
$ ('[data]') .html (html)
More than one dash is required in the line between table headers and table body. The following works:
| a | b | c | d |
| :-- | :--: | :--: | --: |
| 1 | 2 | 3 | 4 |
Preview:
| a | b | c | d |
|---|---|---|---|
| 1 | 2 | 3 | 4 |
According to GFM, one dash tables should be allowed: https://github.github.com/gfm/#tables-extension-