hadynz / obsidian-kindle-plugin

Sync your Kindle notes and highlights directly into your Obsidian vault
MIT License
922 stars 52 forks source link

[BUG] Template Emoji Expands to Unicode #226

Closed elliott-liu closed 6 months ago

elliott-liu commented 1 year ago

Describe the bug

Emojis in template expand to unicode instead of rendering as emoji.

Method of syncing

To Reproduce

Steps to reproduce the behaviour:

  1. Kindle Highlights > Templates > File content
  2. Template I'm using:
    
    ---
    tag: 📥
    alias: {{title}}
    publish: false
    date: (date("YYYY-MM-DD"))
    type: [Book]
    title: {{longTitle}}
    author: [{{author}}]
    image: {% if imageUrl %}{{imageUrl}}{% endif %}
    published: {{publicationDate}}
    isbn: {% if isbn %}"{{isbn}}"{% endif %}
    url: {% if url %}{{url}}{% endif %}
    reviewed: []
    finished: []
    rating: ☆☆☆☆☆
    ---
    # {{longTitle}}
    [![{{title}} Cover Image]({{imageUrl}})]({{appLink}})

Highlights

{{highlights}}


3. Sync and preview output (see attached screenshot).

### Expected behaviour
The emoji is supposed to render as an emoji not unicode.
<img width="765" alt="Screenshot 2022-12-18 at 12 04 42" src="https://user-images.githubusercontent.com/16389800/208297376-42067864-c529-4a8f-ad94-75073a84741e.png">

### Screenshots
**Actual Output**
<img width="1061" alt="Screenshot 2022-12-18 at 11 58 08" src="https://user-images.githubusercontent.com/16389800/208297068-a2744d14-d6fc-4a12-afbc-3035895dbed4.png">

### Metadata
 - OS: macOS Monterey (12.4)
 - Plugin version: 1.8.1
 - Obsidian version: 1.0.3 (Installer 1.0.0)
elliott-liu commented 1 year ago

Note, Obsidian interprets the unicode as an emoji so not entirely an issue! Although, it would be nice if it rendered as expected.