mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #906099 (The TOC generator does not detect Prolog and Epilog when converting files)
This commit is contained in:
parent
7d867afc0d
commit
188f8c9dd8
@ -276,11 +276,11 @@ OptionRecommendation(name='duplicate_links_in_toc',
|
||||
|
||||
OptionRecommendation(name='chapter',
|
||||
recommended_value="//*[((name()='h1' or name()='h2') and "
|
||||
r"re:test(., 'chapter|book|section|part|prologue|epilogue\s+', 'i')) or @class "
|
||||
r"re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class "
|
||||
"= 'chapter']", level=OptionRecommendation.LOW,
|
||||
help=_('An XPath expression to detect chapter titles. The default '
|
||||
'is to consider <h1> or <h2> tags that contain the words '
|
||||
'"chapter","book","section" or "part" as chapter titles as '
|
||||
'"chapter","book","section", "prologue", "epilogue", or "part" as chapter titles as '
|
||||
'well as any tags that have class="chapter". The expression '
|
||||
'used must evaluate to a list of elements. To disable chapter '
|
||||
'detection, use the expression "/". See the XPath Tutorial '
|
||||
|
Loading…
x
Reference in New Issue
Block a user