mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix indent.
This commit is contained in:
parent
f08775dda7
commit
fe267db425
@ -237,14 +237,14 @@ class HTMLPreProcessor(object):
|
|||||||
(re.compile(getattr(self.extra_opts, 'footer_regex')), lambda match : '')
|
(re.compile(getattr(self.extra_opts, 'footer_regex')), lambda match : '')
|
||||||
)
|
)
|
||||||
|
|
||||||
end_rules = []
|
end_rules = []
|
||||||
if getattr(self.extra_opts, 'unwrap_factor', None):
|
if getattr(self.extra_opts, 'unwrap_factor', None):
|
||||||
length = line_length(html, getattr(self.extra_opts, 'unwrap_factor'))
|
length = line_length(html, getattr(self.extra_opts, 'unwrap_factor'))
|
||||||
if length:
|
if length:
|
||||||
end_rules.append(
|
end_rules.append(
|
||||||
# Un wrap using punctuation
|
# Un wrap using punctuation
|
||||||
(re.compile(r'(?<=.{%i}[a-z\.,;:)-IA])\s*(?P<ital></(i|b|u)>)?\s*(<p.*?>)\s*(?=(<(i|b|u)>)?\s*[\w\d(])' % length, re.UNICODE), wrap_lines),
|
(re.compile(r'(?<=.{%i}[a-z\.,;:)-IA])\s*(?P<ital></(i|b|u)>)?\s*(<p.*?>)\s*(?=(<(i|b|u)>)?\s*[\w\d(])' % length, re.UNICODE), wrap_lines),
|
||||||
)
|
)
|
||||||
|
|
||||||
for rule in self.PREPROCESS + pre_rules + rules + end_rules:
|
for rule in self.PREPROCESS + pre_rules + rules + end_rules:
|
||||||
html = rule[0].sub(rule[1], html)
|
html = rule[0].sub(rule[1], html)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user