Make Reflow Selection Markdown aware


I prefer to not use soft wraps when editing markdown files as it makes it difficult to view diffs in git since a paragraph is one long line. The Reflow Selection command is a handy way to inject line breaks but it breaks Markdown links because it will insert a break in the middle of a link name or between the link text and the url.


I’m changing the category to support here because this is about a bug, not a feature, if I’m understanding correctly.

I gave this a try and while putting a hard line break between the label and the URL does break the hyperlink:

Putting a hard line break in the middle of a hyperlink label does not:

even though it does break the syntax highlighting.

I’ve opened:

  • atom/autoflow#11 for the issue with the hard line break between the label and link address
  • atom/language-gfm#37 for the syntax highlighting issue when a label has a line break added where whitespace exists