epub converter: small fix

This commit is contained in:
shirshasa
2021-08-17 17:24:17 +03:00
parent 72651f0cf0
commit 4dae4f22a6

View File

@@ -1,7 +1,6 @@
import os
import pathlib
import re
from html import escape
from typing import List, Tuple
from bs4 import BeautifulSoup, NavigableString, Tag
@@ -379,7 +378,7 @@ def get_tags_between_chapter_marks(first_id, href, html_soup):
def wrap_preformatted_span_with_table(main_tag, old_tag):
table = main_tag.new_tag("table")
table.attrs['border'] = '1px solid #ccc;'
table.attrs['border'] = '1px #ccc;'
table.attrs['style'] = 'width:100%;'
tbody = main_tag.new_tag("tbody")
tr = main_tag.new_tag("tr")
@@ -393,7 +392,7 @@ def wrap_preformatted_span_with_table(main_tag, old_tag):
return table
def wrap_block_tag_with_table(main_tag, old_tag, width='95', border='1px solid', bg_color=None):
def wrap_block_tag_with_table(main_tag, old_tag, width='95', border='1px', bg_color=None):
table = main_tag.new_tag("table")
table.attrs['border'] = border
table.attrs['align'] = 'center'