From d8352224aaede67f2d4fd6ba5f0431b620682156 Mon Sep 17 00:00:00 2001 From: Jeniamakarchik Date: Fri, 10 Apr 2020 17:25:24 +0300 Subject: [PATCH] fix mistype --- src/book.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/book.py b/src/book.py index d86d5a1..369f2df 100644 --- a/src/book.py +++ b/src/book.py @@ -29,7 +29,7 @@ class Book: "Verdana": "verdana,geneva,sans-serif" } - SUPPPORTED_LEVELS = 3 + SUPPORTED_LEVELS = 3 SUPPORTED_HEADERS = {"h1", "h2", "h3"} HEADERS_LEVELS = {"h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "h9"} @@ -49,7 +49,7 @@ class Book: self.images = list() self.content_dict = dict() - assert self.SUPPPORTED_LEVELS == len(self.SUPPORTED_HEADERS), \ + assert self.SUPPORTED_LEVELS == len(self.SUPPORTED_HEADERS), \ "Length of headers doesn't match allowd levels." def configure_file_logger(self, name, attr_name='logger', filename='logs/book_log.log', filemode='w+', @@ -553,7 +553,7 @@ class Book: """ Function to convert all lower level headings to p tags """ - pattern = f'^h[{self.SUPPPORTED_LEVELS + 1}-9]$' + pattern = f'^h[{self.SUPPORTED_LEVELS + 1}-9]$' header_tags = self.body_tag.find_all(re.compile(pattern)) for tag in header_tags: tag.name = 'p' @@ -575,7 +575,7 @@ class Book: tag.unwrap() else: assert tag.name in self.SUPPORTED_HEADERS, \ - f'Preprocessing went wrong, there is still h{self.SUPPPORTED_LEVELS+1}-h9 headings.' + f'Preprocessing went wrong, there is still h{self.SUPPORTED_LEVELS + 1}-h9 headings.' # if tag.name in ["h4", "h5", "h6"]: # tag.name = "h3" # All the lower level headings will be transformed to h3 headings