mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-30 06:44:33 +02:00
improved negative lookaheads in heuristics
This commit is contained in:
parent
984a7510fc
commit
a20cd3336d
1 changed files with 2 additions and 2 deletions
|
|
@ -203,8 +203,8 @@ def markup_chapters(self, html, wordcount, blanks_between_paragraphs):
|
|||
blank_lines = ""
|
||||
opt_title_open = "("
|
||||
opt_title_close = ")?"
|
||||
n_lookahead_open = "\s+(?!"
|
||||
n_lookahead_close = ")"
|
||||
n_lookahead_open = "(?!\s*"
|
||||
n_lookahead_close = ")\s*"
|
||||
|
||||
default_title = r"(<[ibu][^>]*>)?\s{0,3}(?!Chapter)([\w\:\'’\"-]+\s{0,3}){1,5}?(</[ibu][^>]*>)?(?=<)"
|
||||
simple_title = r"(<[ibu][^>]*>)?\s{0,3}(?!(Chapter|\s+<)).{0,65}?(</[ibu][^>]*>)?(?=<)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue