MD - Copy as rich text

I installed the action to copy Markdown text as rich text. This is working fine. But I was wondering if there is a way to preserve the line breaks? After pasting I have to define my ‘next lines’ again.

For example:
Sentence one.
Sentence Two.

Becomes (after pasting):
Sentence one. Sentence Two.

Markdown ignores line breaks. If you want to force a line break, put two spaces at the end of the line. Related spec docs.

Hope this helps!

1 Like

Is there an action to append each line with two spaces? Did not find any in the directory.

I’m not sure which of the copy actions you were using, so I just went with a version of the simplest one for you. I’ve incorporated adding the standard Markdown double spaces to the text the action processes. It will leave the original draft untouched.

Generally though, getting into the habit of using double spaces and blank lines when working with Markdown will make your Markdown syntactically correct for your needs and more transportable. Not every system that uses Markdown will offer the same affordances as Drafts and Markdown continues to surface in more and more places as a text entry option.

1 Like

Great, thanks a lot for this. Works perfect … Tried to make a combination of your action with an earlier one of agiletortoise where you can define the output typeface (I prefer to paste a sans serif typeface instead of the serif one), but I did not manage.

That’s why it always pays dividends to link to an action as there are often several similar ones and ones an individual has modified (or created with the same name).

I have a pretty good idea which one it is, but please do always try to include a link to the specific original action. It does save time :nerd_face:

How about something like this?

1 Like

Thanks a lot! Exactly the action I was looking for. Thanks for mentioning the link to the specific action. I will keep this in mind for next time! (I am quite new here on the forum)