注释掉 table 行

Commenting out a table row

是否可以在(github-flavoured)markdown 中注释掉 table 行?

|   ID    |              Info               |
| ------- | ------------------------------- |
| 1       | I want to keep this row         |
| 2       | This row must be commented out! |
| 3       | I want to keep this row         |

它似乎不适用于 HTML 评论,评论行下方的行将不再被识别为 table 行。 (example gist)

尝试删除要删除的行之前的换行符。

|   ID    |              Info               |
| ------- | ------------------------------- |
| 1       | I want to keep this row         |<!--| 2       | This row must be commented out! |-->
| 3       | I want to keep this row         |

不,无法在 (github-flavoured) Markdown 中注释掉 table 行。事实上 spec 明确指出:

The table is broken at the first empty line, or beginning of another block-level structure

当然,一个HTML的评论是"another block-level structure."所以,评论结束table。充其量,任何添加的 table 行都将被视为单独的 table。但是,由于它们没有附加 header,因此它们不构成完整的 table,因此不会被视为行。