From 29665d415ebd457d0e8f1b4bb9d65554a9aaabd0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Aug 2011 19:42:00 -0600 Subject: [PATCH] Fix #836857 (Italics not correct in Metadata) --- src/calibre/utils/html2text.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/utils/html2text.py b/src/calibre/utils/html2text.py index 3779c68918..b581612eb7 100644 --- a/src/calibre/utils/html2text.py +++ b/src/calibre/utils/html2text.py @@ -14,7 +14,6 @@ __contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"] # TODO: # Support decoded entities with unifiable. -if not hasattr(__builtins__, 'True'): True, False = 1, 0 import re, sys, urllib, htmlentitydefs, codecs import sgmllib sgmllib.charref = re.compile('&#([xX]?[0-9a-fA-F]+)[^0-9a-fA-F]') @@ -215,7 +214,7 @@ class _html2text(sgmllib.SGMLParser): self.blockquote -= 1 self.p() - if tag in ['em', 'i', 'u']: self.o("_") + if tag in ['em', 'i']: self.o("*") if tag in ['strong', 'b']: self.o("**") if tag == "code" and not self.pre: self.o('`') #TODO: `` `this` `` if tag == "abbr":