mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
delay beautifulsoup import until export
This commit is contained in:
parent
7f75364fbe
commit
af66630f07
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,6 @@ from anki.lang import _
|
|||
from anki.utils import findTag, parseTags, stripHTML, ids2str
|
||||
from anki.tags import tagIds
|
||||
from anki.db import *
|
||||
from BeautifulSoup import BeautifulSoup as BS
|
||||
|
||||
class Exporter(object):
|
||||
def __init__(self, deck):
|
||||
|
@ -33,6 +32,7 @@ class Exporter(object):
|
|||
|
||||
def escapeText(self, text, removeFields=False):
|
||||
"Escape newlines and tabs, and strip Anki HTML."
|
||||
from BeautifulSoup import BeautifulSoup as BS
|
||||
text = text.replace("\n", "<br>")
|
||||
text = text.replace("\t", " " * 8)
|
||||
if removeFields:
|
||||
|
|
Loading…
Reference in a new issue