obsidian-prettify icon indicating copy to clipboard operation
obsidian-prettify copied to clipboard

Prettifier is removing escape characters

Open jjspace opened this issue 4 years ago • 5 comments

If I intentionally escape the asterisk like \* because I want a plaintext * in my file, running the Prettifier removes this causing it to become an emphasis character thus changing the formatting of my file.

jjspace avatar Feb 22 '21 17:02 jjspace

+1

dariuszkowalski-com avatar Feb 24 '21 18:02 dariuszkowalski-com

It appears to also do this for # and then puts the text after that hash into the frontmatter when you run update.

For example, body has \#12 of 36

  1. Run Update fields
  2. The backslash escape is removed, leaving #12 of 36.
  3. Run Update fields again
  4. - '#12' is added to the tags frontmatter

SirSpidey avatar Mar 02 '21 20:03 SirSpidey

It also removes escape character from \_.

danil-tolkachev avatar Apr 07 '21 16:04 danil-tolkachev

Also applies to the \| escape which can be used in table links to provide an alias as reported in #20

jjspace avatar Apr 14 '21 15:04 jjspace

Should removing \ be completely removed? It also happens here: \[\[, when you want to have [[ in the document without ruining syntax highlighting.

Icelk avatar Sep 28 '21 13:09 Icelk