From e48e7932fa01be41a041a1bc85019bc2fd979af3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 22 Aug 2011 10:41:17 -0600 Subject: [PATCH] MOBI Output: Add support for the start attribute on
    tags --- src/calibre/ebooks/mobi/mobiml.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index eefa9d9e03..56a7a8b9ca 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -308,6 +308,11 @@ class MobiMLizer(object): istate = copy.copy(istates[-1]) istate.rendered = False istate.list_num = 0 + if tag == 'ol' and 'start' in elem.attrib: + try: + istate.list_num = int(elem.attrib['start'])-1 + except: + pass istates.append(istate) left = 0 display = style['display']