Drafts export to OneNote

Can anyone advise me how to get line breaks back into a draft when I export it to OneNote? Am using a Drafts action but all line breaks disappear. Thank you!

Does it work if it’s a double-line break?

Markdown doesn’t recognize single line breaks in most circumstances.

Gotcha. How can I incorporate double line breaks into my action? Is there a way?

Add a step to find new line character (\n) and replace with two.

There’s an example based on split and join in this thread on the Drafts forums; it is a topic that comes up every few months.

But, I would suggest that you consider writing to the Markdown specification.

PARAGRAPHS AND LINE BREAKS

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.

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

Hope that helps.

1 Like