Anki add-on: Ankleen: Fix AI Markdown and LaTeX Formatting

🧼 Ankleen Ankleen is a safe, one-click formatting cleaner for Anki’s editor. It is designed for people who import cards from CSV or generate card text with AI tools, then notice broken formatting like Markdown bold text, backtick code, or $...$ LaTeX that does not render the way they want in Anki. Ankleen does not bulk-edit your collection. It works only on the note currently open in the editor, and it shows a preview before applying changes. ✨ ✨ Features 📝 Converts common AI-generated Markdown into Anki-friendly HTML: **bold** and __bold__ → <b>bold</b> `inline code` → <code>inline code</code> ~~strikethrough~~ and simple ~strikethrough~ → 
strikethrough
 🧮 Fixes $...$ and $$...$$ math delimiters: Simple probability/set notation is converted to stable Unicode when possible. More complex formulas fall back to Anki-compatible MathJax delimiters. 🔤 Example conversions: $P(A \cup B) = P(A) + P(B)$ → P(A ∪ B) = P(A) + P(B) $P(A \cap B)$ → P(A ∩ B) $P(A \mid B)$ → P(A|B) $A_1^2$ → \(A_1^2\) 📐 Adds spacing cleanup to reduce clumped imported text. 👀 Shows a preview before applying changes. ↩️ Includes an Undo Fix button for the most recent fix on the current note during the current Anki session. 🚀 Usage Open a note in Anki’s editor. Click Fix Formatting in the editor toolbar. Review the preview. Click Apply Fixes to update the current note. Click Undo Fix if you want to restore the previous field values. 🛡️ Safety Notes Ankleen is intentionally non-destructive: It does not scan or modify your whole collection. It does not automatically modify pasted text. It only changes the current note after you confirm the preview. Undo history is stored only in memory for the current Anki session. ✅ Compatibility Tested on: Anki 24.06.3 Python 3.9.18 Qt 6.6.2 PyQt 6.6.1 Other versions may work, but have not been tested yet. 🐛 Bugs, Ideas, and Contributions Found a bug? Have an idea? Want to improve the formatter? PRs, bug reports, feature requests, and suggestions are very welcome! 💖 GitHub repo: https://github.com/DontSpillTheTea/Ankleen ⚠️ Limitations Formatting cleanup is regex-based and intentionally conservative. Some complex Markdown, nested HTML, unusual LaTeX, or edge cases may not convert perfectly. Please review the preview before applying changes.

GitHub repository: dontspillthetea/ankleen
Repository description: Safe one-click Anki formatter that cleans AI-generated Markdown and fixes LaTeX into Anki-friendly HTML/MathJax with preview and undo.
Languages: Python, PowerShell