mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:53:38 +02:00
...
This commit is contained in:
parent
c798239fd7
commit
9a366a92d9
1 changed files with 2 additions and 1 deletions
|
|
@ -315,7 +315,7 @@ def punctuation_unwrap(self, length, content, format):
|
|||
supports a range of html markup and text files
|
||||
'''
|
||||
# define the pieces of the regex
|
||||
|
||||
|
||||
lookahead = "(?<=.{"+str(length)+u"}([a-zäëïöüàèìòùáćéíĺóŕńśúýâêîôûçąężıãõñæøþðßěľščťžňďřů,:“”)\IA\u00DF]|(?<!\&\w{4});))" # (?<!\&\w{4});) is a semicolon not part of an entity
|
||||
em_en_lookahead = "(?<=.{"+str(length)+u"}[\u2013\u2014])"
|
||||
soft_hyphen = u"\xad"
|
||||
|
|
@ -770,6 +770,7 @@ def __call__(self, html):
|
|||
# Multiple sequential blank paragraphs are merged with appropriate margins
|
||||
# If non-blank scene breaks exist they are center aligned and styled with appropriate margins.
|
||||
if getattr(self.extra_opts, 'format_scene_breaks', False):
|
||||
self.log.debug('Formatting scene breaks')
|
||||
html = re.sub('(?i)<div[^>]*>\s*<br(\s?/)?>\s*</div>', '<p></p>', html)
|
||||
html = self.detect_whitespace(html)
|
||||
html = self.detect_soft_breaks(html)
|
||||
|
|
|
|||
Loading…
Reference in a new issue