How to turn off "escaping" when pasting/importing text to markdown?

I assume that there is an option for this but I can’t find it.

What happens is that when I paste text into a markdown document DT “escapes” certain characters. For example

\(jag tar väl föreläsningen över Zoom \:-P \)

While I can guess why this happens, it’s something that I don’t want to happen. How can I turn this off?

What I want is the text to be pasted like this

(jag tar väl föreläsningen över Zoom :-P )

You paste it from where?

Does Shift-Opt-Cmd-P (paste and match style) work or do the same?

Hmmm, things seem to be a bit more complicated than I first thought (which probably explains why I haven’t dealt with this before). In this case I’m pasting text from emails, but I’ve seen something similar when I import files (I don’t have an example at the moment but I think it was HTML documents … see below).

@saltlane That does seem to work when pasting text

@chrillek In this case I’m pasting from an email, what is interesting is that I created a new empty markdown note, selected the same text and pasted … and now it pastes the text as I expected it. As far as I remember I made the same selection and pasted the same text. However, if I select the whole message (which is a rich text mail) then I get the escaping for the very same text (will not be pasting the whole message because of privacy concerns).

So I assume DT detects what’s on the clipboard and tries to do conversion from HTML and then inserts these escapes. I thought I understood why these escapes were there but now I’m not sure. The same thing happens when I select some HTML text from a web site and use Services to create a Markdown note.

If I go to this page: Backlinks panel only shows title of the note with the outgoing link - Bear Bug Report - Bear Community , select the first message, and create a new Markdown document via Services than I get the following

**Bear Version**\: 2.7 \(14262\)  
**OS Version**\: MacOS and iOS  
**What were you doing**\: Using the backlinks feature.  
**What feature did you use**\: The backlinks.  
**What happened**\: On the backlinks panel, sometimes it shows that a note has a link to this note, but it doesn’t show the text, just the note title. I think this happens only with imported notes. If you go to the paragraph that has the link, delete the link and write it again, the issue is resolved. But I have this issue with hundreds of notes, so not good.  
**What did you expect to happen**\: I expect to see the paragraph that links to this note.  
This image shows the backlinks panel of one note. You can see I have 2 backlinks that only show the title of the note\:  

I’m perfectly OK with the conversion of bold to markdown, but the escaping of : and parenthesis I don’t really understand (at first I thought it has something to do with metadata but I was wrong)

What happens when you do as @saltlane suggested?

As I mention in my answer, then it works for text that is pasted.

1 Like

Speed reading on phone. Apologies. I guess what I’m really asking is why that not the solution for you?

See hidden preference RawMarkdownPasting in appendix of the help.

It works, but there is some additional issues that are related … and I’m just curious why/when this happens.

As I describe above the same thing happens when use Services to capture a part of a web page. I’m not really sure what happens if I use the Safari extension to capture that page since it only gives my

<html><head></head><body></body></html>

for this page. I’ve tried on other pages and so far things seem to work. So right now, I’m just trying to figure out what happens when (i.e. what is triggering this escaping) so I have an understanding of what I can expect for different actions.

:+1:t2:

What is the purpose of the backslashes?

If this is at the start of the MD file, it makes sense to escape the colons. Otherwise these line would be interpreted as metadata definitions. See the MultiMarkdown documentation.

1 Like

It safely escapes Markdown characters from unintentionally acting as control characters. As @chrillek noted, the colon is used in MultiMarkdown metadata. Parentheses are used in links.

Note the backslashes are merely cosmetic.

Then I guessed correctly.

What triggers the escaping? Anything other than plain text on the clipboard?

Rich text content on the clipboard.