如何在Github Flavored Markdown中添加内联注释?

mbi*_*ras 8 markdown github

我正在尝试用内联注释创建一个要点.我在这里阅读了一个解决方案,它可以对它自己的行进行评论(如图所示); 但是,它似乎不适用于内联注释.有没有办法在github风格的降价中获取内联评论? 在此输入图像描述

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


[//]: # (This may be the most platform independent comment)
[//]: # (https://stackoverflow.com/questions/4823468/comments-in-markdown)
Run Code Online (Sandbox Code Playgroud)

Ron*_*hah 6

你也可以这样做

<!--- Comments are Fun --->
Run Code Online (Sandbox Code Playgroud)

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

  • 一些项目
  • 有内联评论的东西


mbi*_*ras 5

更仔细地查看此解决方案可能的内联注释解决方法:

- [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://stackoverflow.com/questions/4823468/comments-in-markdown)
[](and another comment down here too using the empty link method)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述