Skip to content

Fix multiple annotation template rendering - #53

Merged
weichenw merged 1 commit into
weichenw:masterfrom
radekkozak:fix-multiple-annotation-template-rendering
Jun 1, 2022
Merged

Fix multiple annotation template rendering#53
weichenw merged 1 commit into
weichenw:masterfrom
radekkozak:fix-multiple-annotation-template-rendering

Conversation

@radekkozak

Copy link
Copy Markdown
Contributor

This fixes nunjucks template rendering of multiple annotations.

Default template would cause omitting original highlights that specific annotations were describing and just rolling them under the first user highlight in the text.

Signed-off-by: Radek Kozak <radoslaw.kozak@gmail.com

This fixes nunjucks template rendering of multiple annotations.

Default template would cause omitting original highlights that specific annotations were describing and just rolling them under the first user highlight in the text.

Signed-off-by: Radek Kozak <radoslaw.kozak@gmail.com>
@radekkozak

Copy link
Copy Markdown
Contributor Author

Hi,
first of all - thank you for creating the plugin!!
Just started to play with it as i think it would be excellent for my Obsidian workflow right now. Good stuff

Second: i spotted weird thing when annotating an article. Got few of annotations but with default template they would roll under only one & the same highlight - even though they belonged to different ones. This could be very misleading for users of the plugin as one could think the plugin itself is not parsing all of data provided by Hypothes.is API.

I checked - underlying data was ok right until the moment it was put through Nunjuck template provided.

See attached screenshots as what it would all look like when rendered before & after

With this PR:

  • i revised default template to render this right
  • cleaned up template a little so it was a little easier on the eyes when trying to analyze what is going inside i

bugged
fixed

Cheers

@weichenw

weichenw commented Jun 1, 2022

Copy link
Copy Markdown
Owner

Thanks alot mate

@weichenw
weichenw merged commit 8b28e42 into weichenw:master Jun 1, 2022
@radekkozak

Copy link
Copy Markdown
Contributor Author

You got it. Thanks again for the nice plugin. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants