bug fixes

This commit is contained in:
Kovid Goyal 2007-07-16 23:44:31 +00:00
parent 43066d6471
commit becc8efe3e
3 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@
## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
''' E-book management software'''
__version__ = "0.3.74"
__version__ = "0.3.75"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
__appname__ = 'libprs500'

View File

@ -235,12 +235,13 @@ class HTMLConverter(object):
lambda match: re.compile(r'<\s*?p.*?>', re.IGNORECASE).sub('', match.group())),
]
# 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),
lambda match: ''),
BAEN_SANCTIFY = [
(re.compile(r'page-break-before:\s*\w+([\s;\}])', re.IGNORECASE),
lambda match: match.group(1)),
(re.compile(r'<p>\s*(<a id.*?>\s*</a>)\s*</p>', re.IGNORECASE),
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):

View File

@ -77,7 +77,8 @@ def create_aggregator(sections):
sec += 1
secfile = os.path.join(_tdir, 'sec%d.html'%(sec,))
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''
for item in contents:
desc = item['description'].strip()