CRs/paragraphs and breaks in Scrivener/MMD HTML export

Hello.

I may be barking at the wrong tree here, or maybe this has been discussed before, or it may be in the manual, or all of the above, but I can’t seem to find this right now, so I’m asking you guys.

I’m currently working on a mid-size Scrivener project which will inevitably end up as an HTML file. This means I will use either Scrivener’s native HTML export or the Compile / Markdown > HTML route.

Now here’s a simple test document, with a carriage return at the end of each line:

Compiling this using Scrivener’s built-in HTML export gives me this:

<p>Top Level Document, first paragraph.</p>
<p>First paragraph, line 2.</p>
<p>
</p>
<p>Second paragraph, line 1.</p>
<p>Second paragraph, line 2.</p>

While the MultiMarkdown > HTML compile command gives me this:

<p>Top Level Document, first paragraph.
First paragraph, line 2.</p> 
 
<p>Second paragraph, line 1.
Second paragraph, line 2.</p> 

Quite a difference, as MMD’s HTML conversion obviously discards carriage returns as such.

Now assuming I’m using a style sheet where each paragraph has considerable margins (work with me here, please :slight_smile: ), Scrivener’s export will look like this in the browser:

…while the MMD export will look like this:

(Carriage returns here are discarded.)

Frankly, what I had hoped for is this:

(or, in HTML)

<p>Top Level Document, first paragraph.

<p>First paragraph, line 2.</p>
<p>Second paragraph, line 1.

<p>Second paragraph, line 2.</p>

TL;DR version:

Is there a way to export HTML from Scrivener where empty lines (= two carriage returns) denote paragraphs (

) and single carriage return becomes
tags?

This would be extremely helpful.

Thanks in advance.

When you use MMD, you can force a
tag by terminating a line with two space characters.

So if you type the following, with space characters where the tildes are

The resulting html will be

[code]

Top Level Document, first paragraph.

First paragraph, line 2.

Second paragraph, line 1.
Second paragraph, line 2.

[/code]

which, I think, is what you want. The HTML you posted is invalid XHTML because two of the

tags aren’t closed.

For more info, see the markdown documentation: daringfireball.net/projects/markdown/syntax#p

Excellent. “Works as advertised” ; thank you. :slight_smile:

Yes; too much copy + pasting. This is indeed what I want.

I will. So far, I have mainly read the MMD docs, and I have yet to find a cheat sheet/reference that encompasses the syntax both of MD and MMD. I may write my own…

Thanks again.