mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
strip media before comparing with the correct answer
This commit is contained in:
parent
8c34fabff8
commit
aeb23cdbcc
1 changed files with 4 additions and 3 deletions
|
@ -5,10 +5,11 @@
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtCore import *
|
from PyQt4.QtCore import *
|
||||||
import anki, anki.utils
|
import anki, anki.utils
|
||||||
from anki.sound import playFromText, stripSounds
|
from anki.sound import playFromText
|
||||||
from anki.latex import renderLatex, stripLatex
|
from anki.latex import renderLatex, stripLatex
|
||||||
from anki.utils import stripHTML
|
from anki.utils import stripHTML
|
||||||
from anki.hooks import runHook, runFilter
|
from anki.hooks import runHook, runFilter
|
||||||
|
from anki.media import stripMedia
|
||||||
import types, time, re, os, urllib, sys, difflib
|
import types, time, re, os, urllib, sys, difflib
|
||||||
from ankiqt import ui
|
from ankiqt import ui
|
||||||
from ankiqt.ui.utils import mungeQA, getBase
|
from ankiqt.ui.utils import mungeQA, getBase
|
||||||
|
@ -175,8 +176,8 @@ class View(object):
|
||||||
a = runFilter("drawAnswer", a, self.main.currentCard)
|
a = runFilter("drawAnswer", a, self.main.currentCard)
|
||||||
if self.main.currentCard.cardModel.typeAnswer:
|
if self.main.currentCard.cardModel.typeAnswer:
|
||||||
try:
|
try:
|
||||||
cor = stripHTML(self.main.currentCard.fact[
|
cor = stripMedia(stripHTML(self.main.currentCard.fact[
|
||||||
self.main.currentCard.cardModel.typeAnswer])
|
self.main.currentCard.cardModel.typeAnswer]))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.main.currentCard.cardModel.typeAnswer = ""
|
self.main.currentCard.cardModel.typeAnswer = ""
|
||||||
cor = ""
|
cor = ""
|
||||||
|
|
Loading…
Reference in a new issue