I've already created an Atom package that runs that on save:
https://atom.io/packages/markdown-format
I've already created an Atom package that runs that on save:
https://atom.io/packages/markdown-format