ankitects/anki

Changing text alignment deletes MathJax block

Open

#5,176 opened on Jul 19, 2026

 (1 comment) (0 reactions) (0 assignees)Rust (2,965 forks)batch import
good first issue

Repository metrics

Stars
 (27,973 stars)
PR merge metrics
 (Avg merge 4d) (68 merged PRs in 30d)

Description

In the Add screen, changing the alignment of text with a MathJax block directly on the line below it causes the MathJax block to be deleted.

Produced on https://github.com/ankitects/anki/releases/tag/26.05 on Pop!_OS 24.04 LTS

To recreate, suppose:

Move text cursor to within the top line of text, then click to change text alignment (in this case to centred, but this happens regardless of which alignment):

Result - MathJax block deleted:

I'm happy to work on this as a first issue if accepted!

Contributor guide