weichenw/obsidian-hypothesis-plugin

Incorrect line spacing between highlights

navakelvin opened this issue · 4 comments

Your plugin works fine but I have noticed a problem:

At the end of the loop there is no instruction that creates a line break, so the highlights after the first are written on the same line corresponding to the last. That last line break instruction is required.

If you could add a variable whose function is the line break that would be great.

PD. At the moment I have partially solved it with double <br> at some point in the template.

ye I also have this problem. If you have a {highlight.annotation} after the {highlight.text}, the second highlight can not create in the new line. Right now, I just use this way to solve this problem. <br> is still not perfect.

{% for highlight in highlights -%}- {{highlight.text}}
{% if highlight.annotation %}   - Annotation: {{highlight.annotation}}
{% if false %}Line Break{%- endif %}
{%- endif -%}
{%- endfor -%}

Hi, I am not sure I am able to reproduce the issue with the highlights I got. In any case, this is what I am using personally.

{% if is_new_article -%}## Highlights{%- endif %} {% for highlight in highlights -%}- {{highlight.text}} — [Updated on {{highlight.updated}}]({{highlight.incontext}}) {% if 'Private' != highlight.group %} — Group: #{{highlight.group| replace(" ", "-")}}{%- endif %} {% if highlight.tags | length %} - Tags: {% for tag in highlight.tags -%} #{{tag | replace(" ", "-")+" "}}{%- endfor %}{%- endif %} {% if highlight.annotation %} - Annotation: {{highlight.annotation}}{%- endif -%}{%- endfor -%}

The same thing happens to me with the default settings.
To reproduce the error, create 2 annotations with tags.

ye I also have this problem. If you have a {highlight.annotation} after the {highlight.text}, the second highlight can not create in the new line. Right now, I just use this way to solve this problem. <br> is still not perfect.

{% for highlight in highlights -%}- {{highlight.text}}
{% if highlight.annotation %}   - Annotation: {{highlight.annotation}}
{% if false %}Line Break{%- endif %}
{%- endif -%}
{%- endfor -%}

Sir, that line {% if false%} Line Break {% - endif%} does all the desired line break work.

Thanks a lot.