[Feature Request] split annotation into commment and quote
Opened this issue · 1 comments
rjbergerud commented
The highlight.annotation
seems to be of the format {comment} - {quoted}
. Is is this a limitation of the hypothesis API not splitting these two parts up in the returned annotation.text
?
I was trying to regex around this in the templating, but it doesn't work when the quoted text includes a hyphen.
{% if highlight.annotation %} - Annotation:
{% set regExpQuote = r/(.+)(\-.+)$/g %}
{{ regExpQuote.exec(highlight.annotation)[0] }}
> {{ regExpQuote.exec(highlight.annotation)[1] }}{%- endif -%}
ginsengtime commented
So I thought I had this same problem, and in my case, it was actually the previous loop not moving to a new line before the next. So it was essentially doing
- {comment 1}
- {annotation 1} - {comment 2}
I solved this by adding a line break right before the {%- endfor -%}
.