anki-plugins icon indicating copy to clipboard operation
anki-plugins copied to clipboard

instant feedback doesn't work properly

Open izanagiii opened this issue 4 years ago • 8 comments

Hi

There is a strange problem with your add-on which I can't figure it out so I attach a video to explain it: bandicam 2020-03-26 07-26-41-864.zip

description: when I make cloze of a syntax (especially when copy it) after entering the answer feedback turns red although the answer is correct but when i manually type the whole cloze (with {{c1::}}) again the problem is solved

This problem doesn't happen all the time but it is common.

Thanks in advance for your time & contribution

izanagiii avatar Jun 01 '20 05:06 izanagiii

Hey @izanagiii !

If you look at 00:00:17, the dashes are different. The first one is larger. That means, it's not exactly the same character.

ssricardo avatar Jun 14 '20 09:06 ssricardo

Hi

Yes you are right, I had not noticed it but now that you mentioned they seem different. I wonder why they are different, but maybe it was an oversight due to changing keyboard from US-English to Canada-English keyboard (but I am not sure I will check it)

Thanks again for your time

izanagiii avatar Jun 14 '20 16:06 izanagiii

Hi Ricardo

Regarding this issue I checked another problematic card and it wasn't for the difference in dashes "-".

the Demo video: bandicam 2020-06-23 21-22-58-908.zip

I am confused and have no idea since there is no html tag or styling involved so I can't see how the second one that I type manually is different from the first one.

Thanks for your time & patience

izanagiii avatar Jun 23 '20 17:06 izanagiii

Hey @izanagiii, can you please paste here that line (the value which you had you the Code field)?!

ssricardo avatar Jul 20 '20 18:07 ssricardo

Hi ssricardo I found the culprit of this problem sometimes (normally when the text is formatted like color, ...) when i hit space it will use " " instead of " " so if you can change the code in a way that it automatically changes " " to normal space " " I think the problem is solved (but there may be a better way to do it)

but sometimes even after replacing " " with " " the problem persist

here is the note file: Selected Notes.zip

Thanks already for you time

izanagiii avatar Jul 22 '20 04:07 izanagiii

The problem is due to mixing it with formatting tags. The add-on takes the text from the cloze entire area (until the }}). And it seems that there are spaces between the tags, and in the end (in the value used on the add-on), it expects multiple spaces. For instance on your card, it expects this: ls -la / ~/Desktop /etc

2020-08-30_18-07

About handling   , I'm not planing to add additional handling to the value for now. I've tried that on other add-on and it causes many side effects, making it harder to maintain. Sorry...

ssricardo avatar Aug 30 '20 16:08 ssricardo

Hi

Thanks for your time and trouble

Yes I understand that applying a fix is not just as easy, so I will stick to editing the html of the fields manually for now

Thanks again :)

izanagiii avatar Sep 29 '20 21:09 izanagiii

Hey! I'm so sorry, but currently I really don't have time to spend on this :/

ssricardo avatar Oct 09 '20 21:10 ssricardo

In the new version, some additional handling was added for the values. Hopefully it solved this, otherwise please open it again (maybe with some updated data).

Addressed in version 2.7 (10.01.2023)

ssricardo avatar Jan 10 '23 22:01 ssricardo