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?
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).
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