mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
use existing stripSounds() instead
This commit is contained in:
parent
98c072fc2a
commit
0ac8c7ae59
2 changed files with 2 additions and 4 deletions
|
|
@ -14,6 +14,7 @@ from anki.decks import DeckManager
|
|||
from anki.tags import TagManager
|
||||
from anki.consts import *
|
||||
from anki.errors import AnkiError
|
||||
from anki.sound import stripSounds
|
||||
|
||||
import anki.latex # sets up hook
|
||||
import anki.cards, anki.notes, anki.template, anki.find
|
||||
|
|
@ -491,7 +492,7 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)):
|
|||
else:
|
||||
format = format.replace("{{cloze:", "{{ca:%d:" % (
|
||||
data[4]+1))
|
||||
fields['FrontSide'] = self.media.stripAudio(d['q'])
|
||||
fields['FrontSide'] = stripSounds(d['q'])
|
||||
fields = runFilter("mungeFields", fields, model, data, self)
|
||||
html = anki.template.render(format, fields)
|
||||
d[type] = runFilter(
|
||||
|
|
|
|||
|
|
@ -121,9 +121,6 @@ If the same name exists, compare checksums."""
|
|||
txt = re.sub(reg, "", txt)
|
||||
return txt
|
||||
|
||||
def stripAudio(self, txt):
|
||||
return re.sub(self.regexps[0], "", txt)
|
||||
|
||||
def escapeImages(self, string):
|
||||
# Feeding webkit unicode can result in it not finding images, so on
|
||||
# linux/osx we percent escape the image paths as utf8. On Windows the
|
||||
|
|
|
|||
Loading…
Reference in a new issue