Error in text comparison highlighting (type: card)

I incorrectly put an “i” at the end of the third word in this list (incorrect hnífi instead of correct hníf)*, but the highlighter didn’t mark it as incorrect.

I have noticed this problem on a few other occasions, always with “i”, never with any other character.

*Actually, in Icelandic, both hníf and hnífi are correct, but that’s not the point here. I’m just using this as an example to point out a bug. The “correct” answer on my card is hníf.

Is it always with fi? What I noticed right away is that the one you typed uses a fi “ligature” character – not truly f then i.

I have come to hate ligatures – because in many fonts they make it impossible to distinguish dotted-i (“fi”) from undotted-ı (“fı”). However, in my research, I’ve never needed to figure out how they work for comparisons. :person_shrugging:t4: Is it just a visual change, and the word is still a separate f and i? Or is the fi-ligature considered a version of the f character? Or does it vary from font-to-font and implementation-to-implementation?

What I can tell you is that adding this to your Styling thankfully makes ligatures go away.

font-variant-ligatures: no-common-ligatures;

So you could test pretty quickly if a card like that still accepts this typo without the ligature.


Good thinking! I think you’re exactly right. The following two test cases seem to prove it:

Screenshot 2024-02-04 at 11.44.22 AM
Screenshot 2024-02-04 at 11.44.34 AM

Where exactly do I find the Styling that I can add your command to? (I’ll keep looking around, but I haven’t been able to find it yet.)

“Cards…” from the top of the editor window, or “Manage Note Types > Cards” from anywhere else. You’ll see front/back templates for each card, and “Styling” that applies to the whole note type. Styling & HTML - Anki Manual

I’ll be curious to know if that fixes it!

1 Like

That worked perfectly! Thank you for your help!

Here’s a screenshot in case it would be helpful to anyone having the same problem.


If the comparison is being fooled by ligature characters – this is probably one that @dae should take a look at. It might be a limitation of the underlying fonts or libraries, in which case it seems like some sort of caution should be documented for folks using code#typeans to change the font.

1 Like

Could I trouble you to post a minimum reproducible example on the issue tracker?

I think we can make that happen. :+1:t4:

@Nick I’m DMing you.

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