Hang with old IR cards. Invalid regular expression: /\<anki-mathjax>?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/: Unmatched ')'

I have many Incremental Reading cards that I frequently delete, but some cause Anki to hang when I click them.

This appears many times in the terminal after I focus the card named “[BetterExplained] Calculus in 10 Minutes: See Patterns Step-by-Step” and Anki cannot be closed.

JS error /_anki/legacyPageData?id=140011735025840:17 Uncaught SyntaxError: Invalid regular expression: /\<anki-mathjax>?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/: Unmatched ')'

Can you reproduce it with all add-ons disabled?

Yes. Note Editor in the Browser is showing some other card (maybe the first one in the deck).
Exporting the note and importing it to a new profile creates a note that does not trigger the bug.

The card was created in 2015, probably using an IR add-on.

anki-mathjax didn’t exist back then. You can export your collection into a separate profile, delete non-needed stuff, then export it again and share it with me, if you’d like me to look into it.

It says “You can attach files up to 10MB”, but the exported collection with one card is 56 MB.

You can use something like Google Drive to share a link with me privately.

I sent a link.

Thanks Aleksej. I was able to reproduce the problem using your collection, but couldn’t come up with a simple fix unfortunately. I suspect the HTML in those notes is malformed, and it’s confusing the editor logic.

OK, I exported and deleted the deck. Maybe one day I will import it and it won’t hang anything. Thanks.

I suspect your issue is the same as Certain inputs can cause editor to hang/freeze · Issue #2897 · ankitects/anki · GitHub, or at least related.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.