0

In markdown comments are made by <!-- Comment -->. However when I try to render the following text the comments remain in the render.

Summary
---
<!--intro-->
Some proteins <!--- the nanoscopic biological machines running our cells --> are ‘anchored’ into the membranes.

i.e It appears as:

comment remains in render

Whereas I am trying to get:

enter image description here

Does inline commenting exist in markdown? Is this the correct way of doing it (is there something wrong with the rendering software)? Or is there a more appropriate way?


The parser I used was MacDown v0.42.

  • 3
    This might depend a lot on the parser you are using. Markdown is not too strictly specified. – kratenko Feb 09 '15 at 19:13
  • That looks to be the problem. Tried a different parser and the comment is removed. –  Feb 09 '15 at 19:15

2 Answers2

0

You used <!--- instead of <!--.

Scott Hunter
  • 48,888
  • 12
  • 60
  • 101
0

The parser I used was MacDown v0.42. It could not remove <!-- or <!---.

As pointed out in the comments other parsers do escape mid-line comments based on these identifiers.


I opened the issue in Github and an effective workaround, suggested by nkalvi, is to use:

Some proteins <span style="display:none"> the nanoscopic biological machines running our cells </span> are ‘anchored’ into the membranes.