From 0dd163cfb38ec6f0a5a3f0e1c426907a317f78e3 Mon Sep 17 00:00:00 2001 From: shirshasa Date: Fri, 22 May 2020 14:19:00 +0300 Subject: [PATCH] code simplified --- src/book.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/book.py b/src/book.py index e340ad6..3b5a1f7 100644 --- a/src/book.py +++ b/src/book.py @@ -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,