diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index a3dadb995d..e5780609d1 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -868,33 +868,18 @@ class Manifest(object): def _parse_txt(self, data): if '' in data: return self._parse_xhtml(data) - from xml.sax.saxutils import escape - self.oeb.log.debug('Converting', self.href, '...') - paras = [] - lines = [] - for l in data.splitlines(): - if not l: - if lines: - paras.append('
'+'\n'.join(lines)+'
') - lines = [] - lines.append(escape(l)) - if lines: - paras.append(''+'\n'.join(lines)+'
') + self.oeb.log.debug('Converting', self.href, '...') + + from calibre.ebooks.txt.processor import txt_to_markdown + title = self.oeb.metadata.title if title: title = unicode(title[0]) else: title = 'No title' - data = '''\ - -