Hi, I’m new here. I have a bug to report, but I’m not sure which subforum to post on. So mods, please shift this to the correct place!
I have a frustrating bug, in that newlines are appear to be duplicated during field replacement. For example I have a card with the field {{Wiktionary}} with the contents:
挑战
Verb
<ol>
<li>(literally) to challenge (to a fight); to throw down the gauntlet</li>
<li>(figuratively) to challenge (invite someone to take part in a contest)</li>
<li>(figuratively) to challenge (put demands on); to test</li>
<li>(figuratively) to challenge (dispute the validity of something)</li>
</ol>
Noun
<ol>
<li>challenge; difficulty</li>
</ol>
I create this within AnkiDroid. If I have on the back:
<div>
<ol>
<li>A</li>
<li>B</li>
</ol>
</div>
{{Wiktionary}}
The result is:
1. A
2. B
挑战
Verb
1. (literally) to challenge (to a fight); to throw down the gauntlet
2. (figuratively) to challenge (invite someone to take part in a contest)
3. (figuratively) to challenge (put demands on); to test
4. (figuratively) to challenge (dispute the validity of something)
Noun
1. challenge; difficulty
This shows that field replacement doesn’t simply insert the HTML code so that it matches the ordered list format of the HTML code above it.
If I open this card in AnkiWeb, I can see the newlines inserted when editing the card. If I remove them, then in AnkiDroid the {{Wiktionary}} field has had all newlines removed.
Is this a real bug or a design feature? How can I avoid it? I’m currently using CSS to set top and bottom margins to -20px to avoid the ugliness.
Cheers,
Edward