hadynz / obsidian-kindle-plugin

Sync your Kindle notes and highlights directly into your Obsidian vault
MIT License
922 stars 52 forks source link

[BUG] Highlight template: `if` statements with equality expression don't work #214

Closed lukebarton closed 1 year ago

lukebarton commented 1 year ago

Describe the bug

If statements in highlights cause an error when syncing highlights.

Method of syncing

To Reproduce

Steps to reproduce the behaviour: Highlight template: {% if color == "yellow" %}I am yellow{% endif %}

Expected behaviour

Expected if statement to test if color equals "yellow" and output "I am yellow"

Screenshots

Metadata

hadynz commented 1 year ago

@lukebarton I am not able to reproduce the error that you speak about.

I've just modified the highlight template and added your if-statement and it works as expected.

image

Can you try with the latest version of the plugin please while you are at it (1.8.0)?

lukebarton commented 1 year ago

Works in 1.8.0