【问题标题】:How do I add inline comments in Github Flavored Markdown?如何在 Github Flavored Markdown 中添加内联评论?
【发布时间】:2026-01-11 08:10:01
【问题描述】:

我正在尝试使用内联注释创建一个要点。我读了一个解决方案here,它可以在它自己的行上添加评论(如图所示);但是,它似乎不适用于内联 cmets。有没有办法在 github 风格的降价中获得内联 cmets?

- [x] some item
- [ ] another item with meta info [//]: # (attempt at meta info as inline comment)


[//]: # (This may be the most platform independent comment)
[//]: # (https://*.com/questions/4823468/comments-in-markdown)

【问题讨论】:

  • This answer 对您链接的问题提供了一种方法...

标签: github markdown


【解决方案1】:

你也可以这样做

<!--- Comments are Fun --->

请记住,markdown 只是编写 HTML 内容的一种更简单的方法。 (注意三个破折号)

  • 一些项目
  • 带有内嵌注释的东西

【讨论】:

    【解决方案2】:

    更仔细地查看 this solution 内联 cmets 的可能解决方法:

    - [x] some item
    - [ ] another item with meta info [//]: # (attempt at meta info as inline comment)
    - [ ] using @ig0774's recomendation [](with an inline comment hidden inside an empty link)
    
    [//]: # (This may be the most platform independent comment)
    [//]: # (https://*.com/questions/4823468/comments-in-markdown)
    [](and another comment down here too using the empty link method)
    

    【讨论】:

      【解决方案3】:

      我被 &lt;?put anything &amp;%#$ here ?&gt; 这件事绊倒了,这似乎是一个相当有力的评论。

      它似乎也适用于 * :-)

      【讨论】: