hint:Field on clicking converts <spans> to <divs> thus breaking card's layout

Whenever using hint:Field option, whatever is hidden inside this field, or between two hint: fields, after clicking on the hidden field’s name, when shown, breaks into as many lines as there were (initially hidden) spaces / nonbreaking spaces / span tags.

In other words, it turns anything intended as inline (span) blocks, into new line (div) ones.
As a result, the initial card’s layout is distorted.

If I remove the hint: prefix, all inline blocks look as they were meant to.

Can this be changed so that initial layout would be kept intact after unhiding the hint: fields?

(This behaviour now is the same on both Ankidroid and Anki Desktop)

You can modify the code to your needs if the defaults do not suit.


1 Like