omnivore-app / obsidian-omnivore

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

[Bug] General Notes Section #59

Closed m4mazzotti closed 1 year ago

m4mazzotti commented 1 year ago

I am trying to use the following template to include a general notes header (not the highlight notes) only when there are notes, however it doesn't seem to be working, the header is always there. {{# section }} ... {{/ section }}: Renders a section of the template if the value of the section is true, such as an array or an object.

Code:

[Read Original]({{{originalUrl}}})
{{#note}}
## General Notes
- {{{note}}}
{{/note}}

Update: After further testing, I have identified that if you have never added a note to an article, it works, however, if you added a note and then removed it, {{#note}} will return true.

jacksonh commented 1 year ago

Thanks, i think in this case the note can get set to an empty string. Can i ask which app you are using to remove the note? iOS?

m4mazzotti commented 1 year ago

Sorry, i forgot to include that! I did remove the note using the web app

m4mazzotti commented 1 year ago

I think it was my fault, I didn't wait enough time for it to save after I removed the a empty space I left there. I just gave it another go and it is working as it should.