mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
munge html on import
This commit is contained in:
parent
4b19cff16b
commit
6a4f1d873b
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ import codecs
|
||||||
from anki.importing import Importer, ForeignCard
|
from anki.importing import Importer, ForeignCard
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
from anki.errors import *
|
from anki.errors import *
|
||||||
|
from anki.utils import tidyHTML
|
||||||
|
|
||||||
class TextImporter(Importer):
|
class TextImporter(Importer):
|
||||||
|
|
||||||
|
@ -120,7 +121,7 @@ class TextImporter(Importer):
|
||||||
|
|
||||||
def parseLine(self, line):
|
def parseLine(self, line):
|
||||||
fields = line.split(self.pattern)
|
fields = line.split(self.pattern)
|
||||||
fields = [f.strip() for f in fields]
|
fields = [tidyHTML(f.strip()) for f in fields]
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
def cardFromFields(self, fields):
|
def cardFromFields(self, fields):
|
||||||
|
|
Loading…
Reference in a new issue