Markdown Preview

Markdown preview is not what I am expecting concerning indented paragraphs. If I want to show an indented paragraph within a list, I would use the following markup:

# Header

Unordered list

- item 1
- item 2.

  Indented paragraph

  Another indented paragraph

The four-space indent on the two sentences following the “item 2”, should be indented to the same level as item 2. If I use other markdown preview apps, this is the case,

Why does it not work within Devonthink 3?

Not all markdown engines are the same. DEVONthink uses MMD6 and what you posted renders in the same way in other markdown apps that use the same engine.

That being said, here is how you can achieve what you expect:

# Header

Unordered list

- item 1
- item 2.  
  Indented paragraph  
  Another indented paragraph  

You need to insert two spaces at the end of this line: - item 2. (This is standard markdown, by the way).
And not insert an empty line before Indented paragraph .

2 Likes

Brett Terpstra has released some Markdown service tools that can solve this problem.

I use the following tool as part of a Keyboard Maestro script that first selects all text.

Paragraphs - Preserve Line Breaks
In Markdown, text without blank lines between it is concatenated into one continuous paragraph, removing line breaks. This is prevented by three spaces at the end of each line, and this Service just adds the spaces to the end of each selected line of text.

Thanks @Bernardo_V . That works.

@groovytwo, I will give that a try.

1 Like

Hi DT community,

I have a follow-up question on the relationship between markdown and preview in DT3. Is there a possibility to ‘lock’ the split screen modus (where ‘source’ (markdown) and ‘preview’ are shown together) so it would be possible to scroll them simultaneously or to jump directly from preview to source? In my longer markdown documents, which I read in preview, it’s sometimes a hard time scrolling through the markdown source in order to find the viewed passage in which I want to make a change or correction.

As for as I can see, it’s neither possible - or I can’t find how - to land immediately on the same phrase when altering between source and preview. DT3 goes always back to the point you left preview or source. This can be useful in other cases, but isn’t a great help when you’re using preview to reread and correct your markdown notes.

Many thanks for any advice!

Welcome @ruben

Synchronized scrolling is not possible in DEVONthink at this time. This may be available in a future release.

1 Like

Ok, thanks for your reply - looking forward to a possible future release.