arianneorpilla / jidoujisho

A full-featured immersion language learning suite for mobile.
GNU General Public License v3.0
819 stars 55 forks source link

Issues with using newlines #356

Closed brishtibheja closed 2 months ago

brishtibheja commented 5 months ago

I am on Redmi 12 (5g ver.) The issue I am facing requires you to turn off the feature that uses <br>

What happens on my phone is the card gets exported perfectly fine but newlines do not appear. I can fix this by opening note editor and re-saving the note. It is quite possible that the issue is with the API? I do not know. I tried using another third party app (takoboto) and it worked fine.

I will be grateful if you look into this when you have time.

brishtibheja commented 2 months ago

I think I misunderstood something here. I disabled use <br> instead of newlines in the export profile. How is this supposed to work? I mean I will get newlines in the note editor but not really in the review screen. Was this working differently before?

I had the advanced option called Replace newlines with HTML turned on in Ankidroid so saving the note does turn the newlines into HTML, thereby making newlines display in the review screen.

arianneorpilla commented 2 months ago

I would look into the CSS template, the pre-line attribute here may be related.

brishtibheja commented 2 months ago

Can you explain it for a non-techie? If I'm not misunderstanding you, this would work

If you were talking about <pre> then I tried it just now. It basically looks something like this now:

Screenshot_2024-04-29-15-15-10-65_a9eef3a2a561b80d5c76daebd0f9a14c The alignment is off and part of the 旺文社 entry is in a single line.

This is how Back part of the template looks like:

<pre>{{#Meaning}}<p><small>{{Meaning}}</small></p>{{/Meaning}} {{#Expanded Meaning}}<p><small>{{Expanded Meaning}}</small></p>{{/Expanded Meaning}}{{#Collapsed Meaning}}<details><summary></summary><p><small>{{Collapsed Meaning}}</small></p></details><br> {{/Collapsed Meaning}}</pre>