reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
897 stars 87 forks source link

Global Tags with Nested Emojis Broken #172

Open Comprehensive-Jason opened 1 year ago

Comprehensive-Jason commented 1 year ago

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

  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 _generateflashcards again, the tag ABCD::blank will disappear.
  5. As you repeatedly run _generateflashcards, 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

github-actions[bot] commented 1 year ago

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

Comprehensive-Jason commented 1 year ago

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.