reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
872 stars 86 forks source link

Latex star (*) symbol misinterpret as emphasized text? #102

Open alpha3141 opened 2 years ago

alpha3141 commented 2 years ago

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

Describe the bug The plugin detects star-symbols in Latex as emphasized 'trigger' under certain circumstances. Latex code is rendered correctly in obsidian, but transferred to anki incorrectly.

To Reproduce

  1. Use Latex-code with more than one star-symbol like this: $1*2*3$
  2. Create flashcard
  3. Now Anki-card looks like: <p>\(1<em>2</em>3\)</p>
  4. Correct would be: <p>\(1*2*3\)</p>

When using spaces behind the star-symbol the anki-insertion works. To Reproduce

  1. Use: $1* 2* 3$
  2. create flashcard
  3. Anki-card looks like: <p>\(1* 2* 3\)</p>
  4. This way it is rendered correctly in Obsidian and anki.

Expected behavior Expected that the card without spaces ($1*2*3$) would generate/inserted correctly in Anki as well.

Screenshots image Obsidian flashcard

image image Wrong generated flashcard in anki

Additional context I really like the plug-in. The 'workaround solution'(with spaces) works.

github-actions[bot] commented 2 years ago

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