reuseman / flashcards-obsidian

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

Broken Latex Syntax Support #80

Closed fugohan closed 2 years ago

fugohan 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 latex code as cloze card.

Markdown used

$$\begin{equation}1234
^1644149848071
\iiiint
\end{equation}$$

I would suggest to remove the cloze support for {...} and just use ==...== or {1:...}

fugohan commented 2 years ago

I dont know how to regex but maybe this query would work?

/({)+\d+.+(})/g

I tested it and I think it would work but I dont know where to change the regex query. But here is a screenshot about the result of the query. Selection_186

reuseman commented 2 years ago

That's a good solution, but I think that we can do better. I will identify math blocks and if some cloze is inside, then it will not be considered.

reuseman commented 2 years ago

Now it should work