By default DEVONthink 3 adds additional elements when pasting markdown. We can disable this by using the below command which will enable raw markdown pasting.

defaults write com.devon-technologies.think3 RawMarkdownPasting -bool TRUE
Bash

Default markdown pasting will produce the below output.

{==// if \#available\(iOS 13.0, \*\) \{==}  
{==// self.isModalInPresentation = true==}  
{==// \}==}
Swift

By enabling raw markdown pasting, we get the below as expected.

if #available(iOS 13.0, *) {
    self.isModalInPresentation = true
}
Swift