Skip to content

Commit

Permalink
Fix encoding error when working with lists
Browse files Browse the repository at this point in the history
  • Loading branch information
glutanimate committed Feb 26, 2017
1 parent 6ef9690 commit d98128e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cloze_overlapper/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class ClozeGenerator(object):
"""Cloze generator"""

cformat = u"{{c%i::%s}}"
cformat = "{{c%i::%s}}"

def __init__(self, setopts, maxfields):
self.maxfields = maxfields
Expand Down
3 changes: 1 addition & 2 deletions cloze_overlapper/overlapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from BeautifulSoup import BeautifulSoup

from aqt import mw
from aqt.utils import tooltip, showWarning
from anki.utils import stripHTML

from .consts import *
Expand Down Expand Up @@ -194,6 +193,6 @@ def processField(self, field):
else:
tag_start = '<{0}>'.format(markup)
tag_end = '</{0}>'.format(markup)
tag_items = u"<li>{0}</li>"
tag_items = "<li>{0}</li>"
lines = "".join(tag_items.format(line.encode("utf-8")) for line in field)
return unicode(tag_start + lines + tag_end, "utf-8")

0 comments on commit d98128e

Please sign in to comment.