Tinderbox Forum

Markdown table Preview with CommonMark or Pandoc

I’m not exactly sure what I’m doing wrong. I’m trying to render a markdown table and it does not seem to be working. I’m using this

| Header  | Another Header |
| field 1 | value one      |

And it renders like this:

I’m tried both the CommonMark and Pandoc HTMLPrevieCommands. Thoughts?

I’ve fallen back to HTML for now.

Reading the docs online, it seems CommonMark doesn’t support this type of table mark-up (but you can insert HTML table tags in MD source).

I think Markdown doesn’t natively support this mark-up either, but some other flavours of Markdown or plug-ins to it do allow your syntax.

That would suggest there isn’t a consistent support for Markdown mark-up for tables and that neither of the bundled Markdown scripts have table support. Then again I don’t use Markdown in my own work so others here may have a better informed take on the status quo. Have you tried any Markdown-centric forum to check on table support?

Hi @satikusala,

Using the Markdown prototype I seem to be able to render tables (including your posted example) using the following $HTMLPreviewCommand (I include the mathjax flag since I often write equations in Markdown):

Screenshot of Tinderbox (9-1-21, 7-25-19 PM)

So, a stupid question- are you using the Markdown prototype (I couldn’t get the table to render without using this prototype)?

Ok, I’m getting close. Question for @eastgate, what is unique about the markdown template, i.e., what attributes can I flag to make other prototypes act like a markdown prototype? I’m close, but I’m missign a couple of pieces to tweak.

Pending more authoritative answers, see my notes on built-in prototypes:

Markdown Allows notes to use Markdown, for local preview or export, without further fiddling with scripts post-export. The prototype presets $HTMLPreviewCommand to use a Markdown distribution inside the Tinderbox app although other builds or different render scrips can be user-configured. $HTMLParagraphStart and $HTMLParagraphEnd to “” (i.e. no code string) in order to eliminate unwanted paragraph markup tags. $Ziplinks is set to false .

It might be worth selecting the Markdown prototype and stepping through the Export Inspector’s sub-tabs to see if other HTML mark-up of $Text has also been affected. The list above isn’t authoritative and is taken from release notes. I’ve generally left the heavy lift of Markdown testing to others as I don’t have a use for it (and have enough learning on my plate already - it’s not me being unwilling, I’m just over-loaded and would rather someone with expertise and need led in that area).

Mystery solved!!! Errant action code was setting $HTMLMarkdown to false. Thanks, all.

1 Like