glutanimate / cloze-overlapper

Anki add-on for memorizing lists and enumerations
https://ankiweb.net/shared/info/969733775
Other
226 stars 38 forks source link

subscripts rendered onto separate lines #20

Closed slesniak closed 5 years ago

slesniak commented 5 years ago

Prerequisite checklist

When writing a list of items with cloze overlapper

[Be as specific as possible. Provide screenshots if you think they can help.]

How can we reproduce the problem?

[What were you doing when the problem occurred?]

I generated an overlapping cloze with chemical formulas which contained subscripts

Expected behavior: subscripts should be rendered

Actual behavior: subscripts are on their own lines

template:screen shot 2019-02-11 at 11 36 54 am as rendered:screen shot 2019-02-11 at 11 37 07 am

simplified test case: template:

screen shot 2019-02-11 at 11 52 04 am

as rendered:

screen shot 2019-02-11 at 11 52 13 am

Reproducible?: yes

Version information

Anki

Version 2.1.8 (71e0c880) Qt 5.12.0 PyQt 5.11.3 cloze-overlapper-release-v0.4.0-alpha.0-anki21.zip (Patreon alpha release)

System

glutanimate commented 5 years ago

Hey Shawn,

Thanks for the exemplary bug report!

Sadly support for subscripts and other HTML tags has been rather limited from the beginning. Although this isn't a definitive solution, one thing you could do for the time being is to manually cloze each line yourself (using Ctrl+Shift+C). This should work regardless of the HTML formatting present.

The proper solution of course would be for the add-on to more intelligently tell line-breaks apart from other types of HTML tags. However, because the question what does and doesn't constitute a line-break can be quite complex in HTML, this is not a trivial problem to solve.

Still, I'll make sure to give this another look before the v0.4.0 release!

Please feel free to track the progress of this in #5 (the issue described is not the exact same, but since both stem from the same root cause I will be closing this in favor of the older bug report).