From d68ecaf264978354891f2a07b479b0efe3b8c546 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Nov 2014 14:32:05 +0530 Subject: [PATCH] ... --- src/calibre/library/comments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/comments.py b/src/calibre/library/comments.py index 1416be14b6..622528722e 100644 --- a/src/calibre/library/comments.py +++ b/src/calibre/library/comments.py @@ -12,7 +12,6 @@ from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, NavigableString, \ CData, Comment, Declaration, ProcessingInstruction from calibre import prepare_string_for_xml from calibre.utils.html2text import html2text -from calibre.ebooks.markdown import Markdown # Hackish - ignoring sentences ending or beginning in numbers to avoid # confusion with decimal points. @@ -135,6 +134,7 @@ def merge_comments(one, two): return comments_to_html(one) + '\n\n' + comments_to_html(two) def sanitize_comments_html(html): + from calibre.ebooks.markdown import Markdown text = html2text(html) md = Markdown(safe_mode='remove') cleansed = re.sub('\n+', '', md.convert(text))