20

I'm trying to create a gist with an inline comment. I read a solution here which works for putting a comment on it's own line (as shown in the image); however, it doesn't appear to work for inline comments. Is there any way to get inline comments in github flavored 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://stackoverflow.com/questions/4823468/comments-in-markdown)
Community
  • 1
  • 1
mbigras
  • 7,664
  • 11
  • 50
  • 111
  • 1
    [This answer](http://stackoverflow.com/a/29724376/274466) to the question you linked offers a way... – ig0774 May 21 '16 at 15:49

3 Answers3

33

You can also just do this

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

Remember, markdown is just an easier way to write HTML content. (note the triple dash)

  • some item
  • Something with an inline comment
Ronak Shah
  • 936
  • 9
  • 17
7

looking more closely at this solution a possible workaround for inline comments:

- [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)

enter image description here

Community
  • 1
  • 1
mbigras
  • 7,664
  • 11
  • 50
  • 111
-1

I fell over this thing <?put anything &%#$ here ?>, it seems like a rather robust comment.

It seems to work for stackoverflow as well :-)