Can I use an action to add a line break after every double space (or some other character)?

I use iOS’s text replacement feature instead of TextExpander. But one problem is, Text Replacement doesn’t retain line or paragraph breaks.

I use Markdown’s double space at the end of each line.

How can I create an action that will insert a line break after every double space, after I insert a block of Text Replacement text in a draft?

It is possible to include newlines in text replacement on iOS, just not as straight forward as it should be, and not necessarily accessible to all.

Drafts does support TextExpander expansion on iOS, so that is another consideration.

In terms of actions, there is one that @dchar created that sets you up with a text replacement system, including “multi line phrases”, within Drafts and driven by a single action.

Hope that gives you some options.