flashcards-obsidian icon indicating copy to clipboard operation
flashcards-obsidian copied to clipboard

Global Tags with Nested Emojis Broken

Open Comprehensive-Jason opened this issue 2 years ago • 2 comments

NOTE: Do you have the last version of the plugin? If not that's probably the problem

Describe the bug The Flashcards plugin fails to process global tags with nested emojis correctly into Anki.

To Reproduce

  • Steps to reproduce the behavior:
  1. Create a page with frontmatter tags with nested emojis like so:
---
tags: ❌ABCD/✅
---
  1. Create a normal card entry
  2. run generate flashcards
  3. The corresponding flashcard in Anki will display the tag ABCD::blank, omitting all emojis.
  4. If you run generate_flashcards again, the tag ABCD::blank will disappear.
  5. As you repeatedly run generate_flashcards, the tag will appear and disappear in Anki.

Expected behavior I expect to simply see the full tag ❌ABCD/✅ from Obsidian in Anki.

Markdown used

---
tags: ❌ABCD/✅
cards-deck: Testing
---

# Test Cards
%% make sure to add `cards-deck:` to frontmatter first %%

## 1111111 #card
2222222

Additional context Add any other context about the problem here.

https://user-images.githubusercontent.com/68677082/205595011-d43339b2-0386-49f2-98c6-943ad316a215.mp4

Comprehensive-Jason avatar Dec 05 '22 08:12 Comprehensive-Jason

Thank you for taking the time to report the issue and help me to make the project better! 🙂

github-actions[bot] avatar Dec 05 '22 08:12 github-actions[bot]

I had a similar issue involving emojis with the dataview plugin here. To fix it, they changed the regex they used to parse tags. I suspect a similar problem afoot here.

Comprehensive-Jason avatar Dec 05 '22 09:12 Comprehensive-Jason