Note templates help, stand-alone highlights?

Hi!

I'm trying to set up a note template for my PDF annotations, and I think I've managed to achieve what I want – with one exception. I can't figure out how to also include a horizontal rule after stand-alone highlights (highlights without a comment).

Everything else seems to work well, with a horizontal rule working as a delimiter between each annotation (but not between a paired highlight and comment). Could anyone take a look and help me? These are the values I have:

noteTemplates.note:
<p>{{comment}}</p><hr>


noteTemplates.highlight:
{{if color == '#5fb236'}}
<h2>{{highlight}}</h2>
{{if comment}}<p>{{comment}}</p><hr>{{endif}}

{{elseif color == '#ff6666'}}
<blockquote><b>{{highlight}}</b></blockquote>
{{if comment}}<p>{{comment}}</p><hr>{{endif}}

{{elseif color == '#a28ae5'}}
<blockquote><i>{{highlight}}</i></blockquote>
{{if comment}}<p>{{comment}}</p><hr>{{endif}}

{{else}}
<blockquote>{{highlight}}</blockquote>
{{if comment}}<p>{{comment}}</p><hr>{{endif}}


  • I figured it out, <hr> should be placed in the beginning, not inside the "if" value which seems obvious now.

    noteTemplates.note:
    <hr><p>{{comment}}</p>


    noteTemplates.highlight:
    <hr>
    <blockquote>{{highlight}}</blockquote>
    {{if comment}}<p>{{comment}}</p>{{endif}}


    With this each annotation is separated with a single horizontal rule.
Sign In or Register to comment.