Convert to Markdown Fails

This is a test file which I created and saved as a Text file in Devonthink (actually I sent it from Drafts to Devonthink):

# Heading Here

## Second Heading

This is a **test**.

What do you *think* ?

This is a link test

[CNN](www.cnn.com)

http://www.cnn.com

[Link text Here](https://link-url-here.org)

![](https://p13.zdassets.com/hc/settings_assets/472723/200014845/HI5BY2yvy7xl1d38Lsmddw-logo.fw.png)


<span style="color:blue">some *blue* text</span>

This is <b>An HTML bold test</b>.  WIll it work?

If I chose “Convert to Markdown” in DT3 the Markdown is not rendered properly:

Apparently that happens because back-slashes are created by the Convert to Markdown process:

If instead I manually paste the contents of the original text file into a new Markdown file in DT3 then it works fine:

Why does the “Convert to Markdown” feature not work?

To my mind, what you are doing is trying to convert something to something it already is. Effectively your original file is markdown, it’s just not marked as such. What is happening when you convert, is that the markdown code is being escaped, as the converter is not expecting to be trying to convert markdown to markdown. Presumably what you actually need to do is to change the file type of the original record to markdown (will it be as simple as adjusting .txt to .md? I don’t know).

1 Like

Exactly.

Entering a name like myname.md is sufficient, this will change the file extension. BTW: All supported plain text extensions can be used.

Thank you both - @Blanc and @cgrunenberg

Changing the extension to .md does indeed work

Also since the file is created via Drafts, I realized I can simply create a Markdown file from the start by editing the Add to Devonthink action to use the CreateMarkdown URL command instead of CreateText

3 Likes