jdlorimer / incremental-reading

Anki add-on providing incremental reading features
https://ankiweb.net/shared/info/935264945
ISC License
216 stars 38 forks source link

Extracts refer to images by a full path #17

Closed aleksejrs closed 6 years ago

aleksejrs commented 7 years ago

Such images are not displayed. The bug holds over from IRead 2.

jdlorimer commented 7 years ago

Can you give an example? What does the HTML of the card say, and where is the image stored?

aleksejrs commented 7 years ago

Original source: pre <img src="001.jpg"> post

Select everything between "p" and "ost", then extract.

New source:

p<span id="s15050502668" ir-bg-color="Green" ir-text-color="White"></span><font color="#ffffff" style="background-color: green;">re <img src="001.jpg" /> p</font><span id="e15050502668"></span>ost

Extract:

<span style="color: rgb(0, 0, 0);font-family: arial;font-size: 20px;font-variant: normal;letter-spacing: normal;line-height: normal;orphans: 2;text-align: center;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);display: inline !important;float: none">re<span class="Apple-converted-space">&nbsp;</span></span><img src="file:///home/user/.local/share/Anki2/test/collection.media/001.jpg" style="max-width: 95%; max-height: 95%; color: rgb(0, 0, 0); font-family: arial; font-size: 20px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" /><span style="color: rgb(0, 0, 0); font-family: arial; font-size: 20px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"><span class="Apple-converted-space">&nbsp;</span>p</span>

jdlorimer commented 7 years ago

This should be easy to fix. I'll try to make it happen over the weekend.

jdlorimer commented 7 years ago

I'm still working on this. I'm having a bit of trouble reproducing the problem, but I'll get it done eventually.

jdlorimer commented 6 years ago

This should be fixed. Let me know if it's not.