forked from LiveCarta/BookConverter
[LAW-3447] fix big intervas in list
This commit is contained in:
11
src/book.py
11
src/book.py
@@ -763,15 +763,14 @@ class Book:
|
||||
|
||||
def _process_lists(self):
|
||||
"""
|
||||
Function to process tags <ul>.
|
||||
Function to process tags <li>.
|
||||
Unwrap <p> tags.
|
||||
"""
|
||||
list_tags = self.body_tag.find_all("ul")
|
||||
li_tags = self.body_tag.find_all("li")
|
||||
|
||||
for tag in list_tags:
|
||||
for il_tag in tag.find_all("li"):
|
||||
il_tag.attrs.update(il_tag.p.attrs)
|
||||
il_tag.p.unwrap()
|
||||
for il_tag in li_tags:
|
||||
il_tag.attrs.update(il_tag.p.attrs)
|
||||
il_tag.p.unwrap()
|
||||
|
||||
def write_html_from_list(self, file_name='url_test.html'):
|
||||
folder_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -83,7 +83,6 @@ def local_convert_book(filename, locker):
|
||||
output_path = Path(os.path.join(folder_path, f'json/{filename}.json'))
|
||||
try:
|
||||
book = Book(book_id=filename,
|
||||
output_path=output_path,
|
||||
main_logger=logger,
|
||||
libra_locker=locker)
|
||||
book.test_conversion()
|
||||
|
||||
Reference in New Issue
Block a user