showdown/test/functional/makemarkdown
Chris 5fc843e175
feat(makemarkdown.table): support non-strict tables
* feat(makemarkdown.table): support non-strict tables

change to support non strict html tables.
currently html tables require both 'thead' and 'tbody' to be set.
since there are many tables out there that dont meet these requirements,
i added support for most common tables. all of the following tables will now
work (the last one, is the only version that is currently working):
<table><tr><td>t 0 - missing thead/tbody</td></tr></table>
<table><tr><td>t 1 - missing thead/tbody</td></tr><tr><td>t 1 body</td></tr></table>
<table><thead><tr><th>t 2 - thead only</th></tr></thead></table>
<table><thead><tr><td>t 3 - thead with td</td></tr></thead></table>
<table><tbody><tr><td>t 4 - tbody only</td></tr></tbody></table>
<table><thead><tr><th>t 5 - both thead and tbody</th></tr></thead><tbody><tr><td>t 5</td></tr></tbody></table>
i thought this feature should be made optional in case you only want
to support fully compliant tables. but then i realized, that the options
are only passed to the markdown subparsers, not the html ones.
and since this does not break anything (all tests pass), its ok, i guess...

Closes #687

* refactor: code refactor and added tests

Co-authored-by: Estevão Soares dos Santos <estevao.santos@gmail.com>
2022-03-26 04:18:05 +00:00
..
cases feat(makemarkdown.table): support non-strict tables 2022-03-26 04:18:05 +00:00
makemarkdown.bootstrap.js test: fix tests 2017-12-23 13:20:14 +00:00
testsuite.features.js fix(lists): Fix makeMarkdown tasklist (#846) 2022-02-24 00:16:31 +00:00
testsuite.standard.js test: add tests for reverse converter 2017-12-23 12:35:31 +00:00