Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image in singe line question is not parsed correctly #8

Closed
scaturigo opened this issue Sep 7, 2019 · 9 comments
Closed

Image in singe line question is not parsed correctly #8

scaturigo opened this issue Sep 7, 2019 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@scaturigo
Copy link

Image inside front part are not displayed correctly. Is it normal ?

@c-okelly
Copy link
Owner

c-okelly commented Sep 7, 2019

Do you have an example and I will have a look at it?

@scaturigo
Copy link
Author

@c-okelly c-okelly self-assigned this Sep 8, 2019
@c-okelly
Copy link
Owner

c-okelly commented Sep 8, 2019

Cool I can replicated the issue and will get to the bottom of it.

HTML extract for the issues

            <ul class="c3 lst-kix_6zxpvpkthfhg-0 start">
                <li class="c0">
                    <span>Question A </span>
                    <span style="overflow: hidden; display: inline-block; margin: 0.00px 0.00px; border: 0.00px solid #000000; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px); width: 190.00px; height: 190.00px;">
                        <img alt="" src="https://lh5.googleusercontent.com/pQzlN0OvcjbFkYhD8gki4UbM2b0U9-7LAte4HY9bIMuTjbSixUVkQXZJTbhIVn-oag0gLIkLdT-9VvhJYmFsuf1Y4DMM0qruPF7pk3OsWJ-WCPvZbnnLO7ZlF-Tv23QpQ1yuPrjI" style="width: 190.00px; height: 190.00px; margin-left: 0.00px; margin-top: 0.00px; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px);" title="">
                    </span>
                </li>
            </ul>
            <ul class="c3 lst-kix_6zxpvpkthfhg-1 start">
                <li class="c5">
                    <span class="c1">Réponse 1 </span>
                </li>
            </ul>

@c-okelly c-okelly changed the title Image inside front part are not displayed correctly Image in question is not parsed correctly and unicode parsing error. Sep 8, 2019
@c-okelly c-okelly changed the title Image in question is not parsed correctly and unicode parsing error. Image in singe line question is not parsed correctly Sep 8, 2019
@c-okelly
Copy link
Owner

c-okelly commented Sep 8, 2019

Ok I know what the issues is. Will aim to have a fix out for tomorrow.

@c-okelly c-okelly transferred this issue from c-okelly/anki-remote-decks Sep 8, 2019
@c-okelly c-okelly transferred this issue from c-okelly/org_to_anki Sep 8, 2019
@c-okelly c-okelly added the bug Something isn't working label Sep 9, 2019
@c-okelly
Copy link
Owner

c-okelly commented Sep 9, 2019

Still looking into it. Will give an update when I have it nearly fixed!

@c-okelly
Copy link
Owner

Possibly looking like the weekend at the earliest tbh. I have uncovered more issues as I've been trying to fix this!

@c-okelly
Copy link
Owner

c-okelly commented Sep 11, 2019

This issues has uncovered another bug.

The image src being used in <img src="${image_url}"> was a url. This means if the card was accessed offline the image would not load.

In addition to this if an image file is missing for a question it is not automatically uploaded.

In order to fix these issues in a backward compatible way the following must be done:

@c-okelly
Copy link
Owner

The fix i went with as a stop gap ensure that during a sync every media item is readded to Anki. This is currently very heavy.

image names are based upon "downloaded_image${hash_of_url}"

This should ensure the name does not change unless the image url changes. I have manually tested this and it word on multiple syncs and image updating

@c-okelly
Copy link
Owner

Closed by #16

Could do with some refactoring though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants