I can only get the sync to work when {{ text }} is the first item in the Highlight template. I was trying to nest everything in an IF statement but found it results in this error when syncing.
I also tried to simply change the order of the default template so that the note is printed first, but got the same error.
Method of syncing
[x] Amazon Kindle Reader
[x] My Clippings file
To Reproduce
Steps to reproduce the behaviour:
Enter the following highlights template
{% if note %}{{note}}{% endif %}
{{ text }} — location: [{{ location }}]({{ appLink }})
2. Attempt to sync (either via Amazon or Clippings file)
3. Results in the following error:
### Expected behaviour
Would expect to be able to use a Nunjucks expression above the line `{{ text }}` in the highlight template.
### Metadata
- OS: Windows
- Plugin version [e.g. 1.7.0]
- Obsidian version [e.g. 0.15.9]
Describe the bug
I can only get the sync to work when
{{ text }}
is the first item in the Highlight template. I was trying to nest everything in an IF statement but found it results in this error when syncing. I also tried to simply change the order of the default template so that the note is printed first, but got the same error.Method of syncing
To Reproduce
Steps to reproduce the behaviour:
Template render error: (unknown path) TypeError: Cannot read properties of undefined (reading '0')