Search code examples
markdownslate-docs

Markdown comment within table


I am looking for a way to add comments specific to different rows in a Markdown table (parsed by Slate). I don't want them to appear in the HTML generated from this Markdown file.

I haven't found any comment syntax which works in this setting. I tried

[]: # (comment)
[]: # "comment"
[]: # 'comment'
[//]: # (comment)
[comment]: # (comment)
<!-- comment -->

and variations of them, could not get anything to work.

Have any of you already succeeded to do so?


Solution

  • The solution I found was to add an extra column to the table on the relevant rows, e.g.

    Name | Description 
    --------- | ------- 
    first item | description | comment
    second item | description
    

    With this the comment never appeared in the generated HTML. I don't know if it is good practice and how portable it is though.