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

21

我正在尝试创建一个带有内联注释的Gist。 我在这里阅读了一个解决方案(链接),可以将注释放在自己的行中(如图所示); 但是,似乎不适用于内联注释。 是否有任何方法可以在Github风格的Markdown中获得内联注释?enter image description here

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


[//]: # (This may be the most platform independent comment)
[//]: # (https://dev59.com/t2445IYBdhLWcg3wgqnT)

1
你链接的问题的这个答案提供了一种方法... - ig0774
3个回答

34

你也可以这样做

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

记住,Markdown 只是一种更容易编写 HTML 内容的方法。 (请注意三个短杠)

  • 一些项目
  • 带有内联注释的内容

7

仔细查看这个解决方案,它提供了一种可能的内联注释解决方法:

- [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://dev59.com/t2445IYBdhLWcg3wgqnT)
[](and another comment down here too using the empty link method)

enter image description here


-1

我遇到了这个东西 <?put anything &%#$ here ?>,它看起来像是一个相当强大的注释。

它似乎也适用于stackoverflow :-)


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接