Markdown content changes after saving


#1

This is my first day using Atom (an awesome editor) to write Markdown (first day also) and I ran into this situation:

I was writing according to the style here:

Lorem ipsum dolor sit amet
=====

consectetur adipiscing elit. Etiam sit amet tempus augue. Suspendisse sodales, enim ac tincidunt bibendum, urna nunc ultricies erat, non congue ligula lectus in nibh. Integer faucibus

* feugiat augue, a consectetur lectus cursus et. Donec lacinia felis tincidunt nisi
* ullamcorper accumsan. Sed congue malesuada mi in vestibulum. Praesent at mollis diam. Mauris mattis sed ipsum eu efficitur. Cras vel feugiat lectus. Integer nec ante eu tortor scelerisque cursus sed id risus. Donec volutpat 

And the preview using markdown-preview-plus looks all good. However after hitting Ctrl-S to save the document the text became:

Lorem ipsum dolor sit amet
==========================

consectetur adipiscing elit. Etiam sit amet tempus augue. Suspendisse sodales, enim ac tincidunt bibendum, urna nunc ultricies erat, non congue ligula lectus in nibh. Integer faucibus - feugiat augue, a consectetur lectus cursus et. Donec lacinia felis tincidunt nisi - ullamcorper accumsan. Sed congue malesuada mi in vestibulum. Praesent at mollis diam. Mauris mattis sed ipsum eu efficitur. Cras vel feugiat lectus. Integer nec ante eu tortor scelerisque cursus sed id risus. Donec volutpat

and markdown-preview-plus failed render a preview for this.

At first I suspect that it was caused by one of the markdown packages that I installed. So I disabled them (leaving only markdown-preview-plus) but the issue is still there.

What should I do? Is there a way to prevent this auto-formatting thing?

OS version: Fedora 23, Kernel 4.2.6
Atom version: 1.3.2


#2

Can you reproduce the issue in Safe Mode?

To launch Safe Mode:

  1. Completely exit all instances of Atom
  2. Launch Atom with the command atom --safe

I don’t typically use those kinds of headers, but I copy-pasted the initial text into a new Markdown document and saved it. It didn’t extend the header underline when I saved on Atom v1.3.2 on Mac OS X 10.11.2. I don’t have any special Markdown packages installed though.


#3

Just tried - the issue is not there in safe mode.


#4

So it would seem that one of your Markdown packages is causing this. You may want to use @mark_hahn’s package-cop package to help track down which package is causing the issue.


#5

I just restarted Atom and now the problem is gone! Then I tried to install package tidy-markdown and the problem is back.

So I just realized that all my previous hacking was done within one continuous session (process) while I first installed and then uninstalled the package tidy-markdown. I thought things will take effect immediately without the need to restart but apparently this is not case for disabling/uninstalling packages.

@leedohm Thank you for your help!


#6

You can disable and re-enable packages without restarting. Package-cop does this. The only problem is that many packages don’t handle disconnects correctly and crash. This isn’t normally noticed because everything is restarting anyway. When I saw this using package-cop I would report this as issues to the packages. I had a template I sent. But they were all ignored so I gave up.