@jschauma in markdown-mode for emacs they have interactive function for this