Markdown paragraph break question

I’m using iA Writer for my text files but I’m running into a frustrating problem. Unless I put a paragraph between paragraphs, everything runs together. But putting a paragraph between every paragraph really makes the text long. Is there syntax to force the paragraph in preview/export to that I can keep paragraphs together in the markdown text view? See attached. This does not happen in something like Ulysses. Am I missing something?

Markdown View:
Screen Shot 2020-09-01 at 3.53.04 PM

Preview View:
Screen Shot 2020-09-01 at 3.53.11 PM

Two spaces at the end of a line inserts a break.

1 Like

WYDSIWYG

What you don’t see is what you get.
I think this was a strange choice for markdown.

3 Likes

I guess that it made sense at the time, before iOS and the double space period.

That’s an annoyance of IA Writer on iOS – iA Writer on macOS doesn’t have that behavior.

That said, it’s pretty common behavior for a lot of markdown editing software to require two breaks at the end of a paragraph.

That worked, thanks!

I get the same behaviour on iA Writer for Mac.

I also turned off shortcut in keyboard settings. I’ve always been frustrated with the auto period insertion on the iPad and Mac. On the phone it is fine.

Too bad. :frowning_face:
I don’t.

Quoting Gruber’s original Markdown description:

A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line — a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

The implication of the “one or more consecutive lines of text” rule is that Markdown supports “hard-wrapped” text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type’s “Convert Line Breaks” option) which translate every line break character in a paragraph into a <br /> tag.

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

Yes, this takes a tad more effort to create a <br /> , but a simplistic “every line break is a <br /> ” rule wouldn’t work for Markdown. Markdown’s email-style blockquoting and multi-paragraph list items work best — and look better — when you format them with hard breaks.

Ironically, some newer “flavors” of Markdown deliberately break this behavior, to the point where many people don’t realize that it goes directly against one of the key feature/behaviors that Gruber intentionally chose.

3 Likes

I think this must be the case with Ulysses, which is why until now I did not realize this was not “normal” markdown behavior as I “learned” markdown using Ulysses.

Ulysses notes in their documentation and on their site that their Markdown XL flavor is needed to provide additional features not in the Markdown spec, including Comments, Annotations, and Delete, but if you need different or strict Markdown you can choose between Markdown, MarkdownXL, Textile and Minimark flavors.

2 Likes

To me a double line break to separate paragraphs is natural. After all that’s what you’d type in plain text.

3 Likes

One of several, in my view.

The use of blank lines to separate paragraphs does hark back to the days of Text User Interfaces (TUIs) and for that matter to typewriters and teleprinters. But, you know, computers are really good at defining new sets of rules. :confused:

Personally, as I started using computers back in the TUI days, I automatically use blank lines anyway. So it’s no skin off my nose, but I do respect OPs concern for document length and this is something I notice in my own documents.

1 Like

Thanks for the quote, but it doesn’t address the issue of this being invisible markdown.

The simple solution would seem to be, two or more consecutive white space characters is a line break. Those could be two spaces, or two newlines (which is what people intuitively use).

That’s pretty much what we have, isn’t it?

1 Like

My understanding is they have to be spaces, not whitespace characters (which includes newline).

My use case for having a paragraph define as a newline and a blank line is ventilated prose. Handy when you want to create simple and well encapsulated sentences. Markdown adhering to the standard convention allows you to type with line breaks, but have it compiled as a complete paragraph.

Note that markdown preview, Marked has an option to accept paragraph line breaks, so you could have both behaviours with the same markdown “code”. Brett Terpstra’s Markdows Service Tools also has an option to preserve paragraph line breaks.

1 Like

Were you referring to two spaces converting to a period? I was thinking you were saying that iA Writer for Mac didn’t require two spaces to create a line break.