简体   繁体   中英

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?

The solution I found was to add an extra column to the table on the relevant rows, eg

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM