mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More baen markup cleaning
This commit is contained in:
parent
dae41f4e40
commit
8a4707b0a8
@ -232,10 +232,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*[Aa]\s+id="p[0-9]+"\s+name="p[0-9]+"\s*>\s*<\/[Aa]>'),
|
||||
BAEN_SANCTIFY = [(re.compile(r'<\s*a\s+id="p[0-9]+"\s+name="p[0-9]+"\s*>\s*</a>', re.IGNORECASE),
|
||||
lambda match: ''),
|
||||
(re.compile(r'page-break-before:\s*\w+([\s;\}])'),
|
||||
lambda match: match.group(1)) ]
|
||||
(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)),
|
||||
]
|
||||
|
||||
class Link(object):
|
||||
def __init__(self, para, tag):
|
||||
|
Loading…
x
Reference in New Issue
Block a user