Atom editor remove link labels in markdown


#1

Atom editor remove the comments.


#2

I just tried typing in HTML-style comments into Markdown and they worked just fine. Perhaps I’m not understanding the question?


#3

Please, check the “Stackoverflow” link.

If you create a Markdown file (.md) and put some comment using “link labels”; Atom will remove the comments from the file when I save it.

Even HERE, the comments are excluded.

[//] : # (This may be the most platform independent comment)
(I put an space “] :”)


#4

Please, check the “Stackoverflow” link.


#5

I read stackoverflow and I don’t see any reference to what the standard is. Where is that documented?


#6

I agree, I don’t know what is the standard, but the second answer is the best option, and is a weird behavior a save, delete text.

If you put:
[//]: # (This may be the most platform independent comment)
[comment]: <> (a reference style link.)
[//]: <> (This is also a comment.)

This will be deleted when you save the document “tmp.md”.


#7

Apparently it isn’t too common since neither Github nor Discuss support it.

BTW, this reply has a comment. This technique also works in Atom.

I just used the obvious …

[ ](comment)

#8

There’s no such thing as a comment in Markdown. You can check the original Markdown “standard” here:

http://daringfireball.net/projects/markdown/

And GitHub’s documentation for the GitHub-flavored Markdown here:

https://help.github.com/articles/github-flavored-markdown/

And the very first answer on the Stack Overflow question suggested using HTML comments (which work no problem), not these non-standard link-but-not-link constructs. So I’m not sure why you would insist on using something in a way that it isn’t intended and then complain that it doesn’t work for the use it isn’t intended for?


#9

I also just tried pasting this into a Markdown file:

[//]: # (This may be the most platform independent comment)
[comment]: <> (a reference style link.)
[//]: <> (This is also a comment.)

And not a single bit of it was deleted when I saved the file. Are you talking about the generated HTML?


#10

Previous Lines Deleted

I put here in the beginning and disappear; try save 2 or 3 times (CTRL+S)


#11

If possible I would like to use the second option, because the first option “the comment WILL show up in the generated
HTML (and thus be visible with “view source”). So you have to be careful what you put in that comment”

And again, if you put that link labels comments, save as “.md” (this is important) and press CTRL+S 2 times, the Atom delete all the comments from the source file.


#12

Here’s a GIF of me pasting in the lines to a Markdown file and saving a bunch of times and the text not being deleted:

So you’ll have to be more specific as to what exactly you mean. Please include exact repro steps. Also please try to reproduce the issue in Safe Mode, exit all running instances of Atom and start it with the command atom --safe.


#13

Thank you for helping, here the Atom delete the comments when I save it.

I’m using Linux and Atom 1.0.7


#14

Have you followed the suggestions in the Debugging document? Also, could you give the following information?

  • What OS, distribution and version are you running?
  • Can you reproduce the issue after completely exiting Atom and restarting using atom --safe?