cdaven / tiddlywiki-stuff

My TiddlyWiki macros and plugins.
MIT License
9 stars 2 forks source link

Table export ignores thead tags #5

Open michaeljmcd opened 2 months ago

michaeljmcd commented 2 months ago

The end result is that if you export a tiddler with a table rendered with headers under a thead row, the entire row is absent from the exported Markdown.

Steps to reproduce:

  1. Import Table Export Example.json as a tiddler in the example wiki at https://cdaven.github.io/tiddlywiki/index.html
  2. Click the export button and choose "Markdown".

The rendered markdown will render:

Here is an example:

| ASDF |
|------|

Which turns the first data row into the header and removes the header entirely.

This isn't really an issue when using WikiText because TiddlyWiki places header rows under tbody, but if you use the Markdown plugin and use Markdown headers, you'll get header rows in thead. (As a digression, I use Markdown export on Markdown tiddlers to handle transclusion, widgets, and wiki links that are allowed in Markdown tiddlers).

cdaven commented 1 month ago

Thanks for the bug report. I understand the problem, but I cannot make any promises about fixing it anytime soon.

michaeljmcd commented 3 weeks ago

I took a look at the code and I think I see how to make the change. I will post a PR.