mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
bug fixes
This commit is contained in:
parent
43066d6471
commit
becc8efe3e
@ -13,7 +13,7 @@
|
|||||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
''' E-book management software'''
|
''' E-book management software'''
|
||||||
__version__ = "0.3.74"
|
__version__ = "0.3.75"
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||||
__appname__ = 'libprs500'
|
__appname__ = 'libprs500'
|
||||||
|
@ -235,12 +235,13 @@ class HTMLConverter(object):
|
|||||||
lambda match: re.compile(r'<\s*?p.*?>', re.IGNORECASE).sub('', match.group())),
|
lambda match: re.compile(r'<\s*?p.*?>', re.IGNORECASE).sub('', match.group())),
|
||||||
]
|
]
|
||||||
# Fix Baen markup
|
# Fix Baen markup
|
||||||
BAEN_SANCTIFY = [(re.compile(r'<\s*a\s+id="p[0-9]+"\s+name="p[0-9]+"\s*>\s*</a>', re.IGNORECASE),
|
BAEN_SANCTIFY = [
|
||||||
lambda match: ''),
|
|
||||||
(re.compile(r'page-break-before:\s*\w+([\s;\}])', re.IGNORECASE),
|
(re.compile(r'page-break-before:\s*\w+([\s;\}])', re.IGNORECASE),
|
||||||
lambda match: match.group(1)),
|
lambda match: match.group(1)),
|
||||||
(re.compile(r'<p>\s*(<a id.*?>\s*</a>)\s*</p>', re.IGNORECASE),
|
(re.compile(r'<p>\s*(<a id.*?>\s*</a>)\s*</p>', re.IGNORECASE),
|
||||||
lambda match: match.group(1)),
|
lambda match: match.group(1)),
|
||||||
|
(re.compile(r'<\s*a\s+id="p[0-9]+"\s+name="p[0-9]+"\s*>\s*</a>', re.IGNORECASE),
|
||||||
|
lambda match: ''),
|
||||||
]
|
]
|
||||||
|
|
||||||
class Link(object):
|
class Link(object):
|
||||||
|
@ -77,7 +77,8 @@ def create_aggregator(sections):
|
|||||||
sec += 1
|
sec += 1
|
||||||
secfile = os.path.join(_tdir, 'sec%d.html'%(sec,))
|
secfile = os.path.join(_tdir, 'sec%d.html'%(sec,))
|
||||||
title, contents = section
|
title, contents = section
|
||||||
toc += '<li><a href="%s">%s</a></li>\n'%(secfile, title,)
|
fix = 'file:' if iswindows else ''
|
||||||
|
toc += '<li><a href="%s">%s</a></li>\n'%(fix+secfile, title,)
|
||||||
stoc = u''
|
stoc = u''
|
||||||
for item in contents:
|
for item in contents:
|
||||||
desc = item['description'].strip()
|
desc = item['description'].strip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user