From 43103496ab41189c581c7c45cab0eeb49d85f4ac Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 5 Nov 2010 18:52:32 -0600 Subject: [PATCH] MOBI Output: Add support for tag --- src/calibre/ebooks/mobi/mobiml.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 56930ad2a9..7e4e2e4f57 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -386,6 +386,15 @@ class MobiMLizer(object): for attr in ('rowspan', 'colspan','width','border','scope'): if attr in elem.attrib: istate.attrib[attr] = elem.attrib[attr] + if tag == 'q': + t = elem.text + if not t: + t = '' + elem.text = u'\u201c' + t + t = elem.tail + if not t: + t = '' + elem.tail = u'\u201d' + t text = None if elem.text: if istate.preserve: