zhaohongxuan / obsidian-weread-plugin

Obsidian Weread Plugin is a plugin to sync Weread(微信读书) hightlights and annotations into your Obsidian Vault.
MIT License
1.25k stars 65 forks source link

格式疑问 #29

Closed seyeeL closed 2 years ago

seyeeL commented 2 years ago

image 为什么本书评论上面会有这块空白,代码如下

---
isbn: {{metaData.isbn}}
category: {{metaData.category}}
---

## Meta
> [!abstract] {{metaData.title}}
> - ![ {{metaData.title}}|200]({{metaData.cover}})
> - 书名: {{metaData.title}}
> - 作者: {{metaData.author}}
> - 出版时间 {{metaData.publishTime}}
> - ISBN: {{metaData.isbn}}
> - 分类: {{metaData.category}}
> - 出版社: {{metaData.publisher}}
{% for chapter in bookReview.chapterReviews %}
{% if chapter.reviews or chapter.chapterReview %}
{% if  chapter.chapterReview %}
### Notes
- {{chapter.chapterReview.content}}{%endif %}
{% if chapter.reviews %}{%for review in chapter.reviews %}
 {% endfor %} {%endif %} {% endif %} {% endfor %}
{% if bookReview.bookReview %}
### 本书评论
{{bookReview.bookReview.mdContent}} ^{{bookReview.bookReview.reviewId}}
{% endif %}
## highlights
{% for chapter in chapterHighlights %}
### {{chapter.chapterTitle}}
{% for highlight in chapter.highlights %}{% if highlight.reviewContent %}
- {{ highlight.markText |trim }}  — created on [[{{highlight.createTime.slice(0, 10)}}]]{{highlight.createTime.slice(10, 16)}} ^{{highlight.chapterUid}}-{{highlight.range}}
 {{highlight.reviewContent}}
{% else %}
- {{ highlight.markText |trim }}  — created on [[{{highlight.createTime.slice(0, 10)}}]]{{highlight.createTime.slice(10, 16)}} ^{{highlight.chapterUid}}-{{highlight.range}}
{% endif %} {% endfor %}{% endfor %}
zhaohongxuan commented 2 years ago

参考这里~ https://mozilla.github.io/nunjucks/templating.html#whitespace-control