mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
compare typed answer in nfc form
This commit is contained in:
parent
8e8de1e333
commit
daca1af693
1 changed files with 3 additions and 0 deletions
|
@ -435,6 +435,9 @@ Please run Tools>Empty Cards""")
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
def tokenizeComparison(self, given, correct):
|
def tokenizeComparison(self, given, correct):
|
||||||
|
# compare in NFC form so accents appear correct
|
||||||
|
given = ucd.normalize("NFC", given)
|
||||||
|
correct = ucd.normalize("NFC", correct)
|
||||||
s = difflib.SequenceMatcher(None, given, correct, autojunk=False)
|
s = difflib.SequenceMatcher(None, given, correct, autojunk=False)
|
||||||
givenElems = []
|
givenElems = []
|
||||||
correctElems = []
|
correctElems = []
|
||||||
|
|
Loading…
Reference in a new issue