forked from LiveCarta/BookConverter
code simplified
This commit is contained in:
@@ -856,10 +856,7 @@ class Book:
|
||||
same_first_titles = self.top_level_headers[0]['title'] in json_strc[0].keys()
|
||||
is_first_header_introduction = not self.top_level_headers[0]['should_be_numbered']
|
||||
|
||||
if is_first_header_introduction and same_first_titles:
|
||||
json_strc[0]['is_introduction'] = True
|
||||
else:
|
||||
json_strc[0]['is_introduction'] = False
|
||||
json_strc[0]['is_introduction'] = is_first_header_introduction and same_first_titles
|
||||
|
||||
self.content_dict = {
|
||||
"content": json_strc,
|
||||
|
||||
Reference in New Issue
Block a user