r/Anki•
Pathawi

Automatic Addition of HTML/CSS I didn't write

Question

I often find that when I'm editing the HTML of a card, Ank inserts additional code I didn't write. For example, when I want to specify grammatical information in a cloze, I'll often enclose Leipzig glossing abbreviations in a <span> to produce small caps. So I'll write something like:

When do you go.<span style="font-variant: small-caps;">ipfv</span>?

Anki consistently changes this to:

When do you go.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-caps: small-caps;">ipfv</span>?

So the shorthand gets replaced by three of its constituent properties, two of which are irrelevant to the selection. Visually, this is a bit cluttered for me, so I usually manually change it back.

A couple questions:

  1. Anyone know why Anki is programmed to make this replacement?
  2. Is there some reason I should want this?
  3. If not, anyone know if there's a setting somewhere where I can prevent this from happening?

(The other place I've noticed this is in the production of tables, where it gets extremely annoying, but I haven't paid enough attention to work out what the pattern is, beyond that Anki automatically encloses everything in a <tbody>, which is the non-annoying part.)

Posted Sep 18, 2021, 1:28 PM UTC

00

No comments yet

Nobody commented on this post, or the comments weren't captured.