Create preset for wrapping tags with tables

This commit is contained in:
Kiryl
2022-06-24 17:12:00 +03:00
parent 9f067bb93d
commit d91f6aba4a
3 changed files with 3 additions and 6 deletions

View File

@@ -107,10 +107,7 @@ class LibreHTML2JSONConverter:
def convert_to_dict(self):
"""Function which convert list of html nodes to appropriate json structure."""
json_strc = []
ind = 0
ch_num = 0
ch_amt = 0
json_strc, ind, ch_num, ch_amt = [], 0, 0, 0
try:
while ind < len(self.content):

View File

@@ -84,4 +84,4 @@ def preprocess_footnotes(source_html_tag: Tag, href2soup_html: dict = None, note
footnote_tag = footnote_tag.find(
attrs={"role": "doc-backlink"}) or footnote_tag
new_footnotes_tags.append(footnote_tag)
return footnotes, new_noterefs_tags, new_footnotes_tags
return footnotes, new_noterefs_tags, new_footnotes_tags

View File

@@ -64,4 +64,4 @@ def update_images_src_links(body_tag: BeautifulSoup,
del img.attrs["height"]
if img.attrs.get("style"):
del img.attrs["style"]
return path2aws_path
return path2aws_path