omnivore-app / obsidian-omnivore

Obsidian plugin to fetch articles and highlights from Omnivore
MIT License
757 stars 41 forks source link

Markdown output to obsidian has problem #50

Closed SettingDust closed 1 year ago

SettingDust commented 1 year ago

The slashes in content is encoded to /

jacksonh commented 1 year ago

@SettingDust so just confirming, to replicate this you find an article with / in it, save it, highlight the /, sync to Obsidian, and it appears escaped there in the content?

sywhb commented 1 year ago

Hey @SettingDust @jacksonh, you can use {{& content }} or {{{ content }}} in the template to unescape HTML characters in the content.

References: https://docs.omnivore.app/integrations/obsidian.html#mustache-template-language

sywhb commented 1 year ago

This is a duplicate of: https://github.com/omnivore-app/obsidian-omnivore/issues/32

jacksonh commented 1 year ago

Ah, so I guess because the content is markdown, the recommended default should be {{& content }}, right?

sywhb commented 1 year ago

@jacksonh we recommend using {{{ variable }}} for all variables in the template as the file format in Obsidian is markdown

SettingDust commented 1 year ago

Sry for delay. Missed emails. & should work. I've faced this before and fix it in my own addon https://github.com/SettingDust/obsidian-web-clipper/blob/main/src/assets/default.template

sywhb commented 1 year ago

Hey @SettingDust, thanks for letting me know. I will close this issue for now