New lines in Markdown

I know DEVONthink uses the MultiMarkdown syntax, but all the same I’ve been struggling with the display of line endings in the preview.

My existing MD documents didn’t adhere to the MultiMarkdown specs of ending a line with two spaces, and displayed like A in the picture below:

But manually adding two spaces at the end of a line has consequences I don’t like (see under B). What I want is my docs to display like C.

Now that DT supports a global stylesheet (via Preferences > Media > Style Sheet) I realised I can achieve this with a bit of css. Simply adding

white-space: pre-line;

to the p selector does the trick.

I couldn’t find anything about this in the forum, so maybe this is useful to someone else as well.

Or did I miss something, and is there a better solution to this problem?

No, there isn’t a better solution - though there are likely other CSS options that could be explored.

Markdown and MultiMarkdown require the two spaces at the end. If your fix works for you, I’d say use it.