Paragraph Break

When I am editing I hit the return key and I get a new line. When I convert my markdown the line break is not recognized. It takes two returns to get a line break.

I don’t want this. Where are the settings to change this behavior.

1 Like

You put two spaces at the end of a line in Markdown format for just a line break. A paragraph requires one or more blank lines in between. That’s simply the Markdown syntax, there are no settings to affect this.

Ref. https://daringfireball.net/projects/markdown/syntax#p

1 Like

To be doubly sure you could code a <br/> :slight_smile:

On a related topic, iOS adds a period when using 2 spaces. While I prefer this behavior most of the time, it’s a problem when working in markdown apps like Drafts. I know this can be turned off in system settings, but is it possible to disable this feature only in Drafts?

Maybe. But probably unlikely since it is a keyboard level setting.

Consider setting up a shortcut text replacement for it (E.g.qq to be replaced by <space><space>) if you want it cross app but wish to retain the regular replacement.

2 Likes

If you wait two or three seconds between spaces, iOS won’t create an automatic period.

2 Likes

Instead of waiting, I usually type the spacebar once, then the arrow key to move back one space and then the spacebar again. Extra keystrokes, but it’s pretty fast at least with a keyboard.

1 Like

My text is coming in from a shortcut so on looks like I will have to process it there to add the spaces. Does anyone know a regex that will add two spaces to the end of a line?

This action will automate it for you. Run this at the end of writing your note and it will fix up all the lines so you get what you want.

https://actions.getdrafts.com/a/1IP

2 Likes

Thanks, Solved it in Shortcuts for the current instance but this is more general.

Reading this, I went and created an action key (in the row above the regular keyboard in Drafts) to paste two spaces and a return. Voila, my own line-break key… now I just have to get in the habit of using it instead of enter.

1 Like

General note: If you use MultiMarkdown, it also has an “Escaped Line Break” feature which will treat a backslash (\) at the end of a line as a forced line break, like the two spaces.

This has the advantage of make the line breaks visible in the text.

It has the disadvantage of making your Markdown less portable because other Markdown parsers may not respect this option.

If you want to use this, be sure you have MultiMarkdown selected in Markdown Settings and have the “Escaped line break” setting enabled.

1 Like

Interesting! I usually do use MultiMarkdown, but I didn’t know that. Thanks.

Still, can’t see myself using it. Is use (Multi)Markdown primarily because it’s plain text, but also because it’s readable without an interpreter, and the slashes would be too distracting for me.

1 Like