Add 1-many css + Fix bug 4635

This commit is contained in:
Kiryl
2021-09-28 13:37:37 +03:00
parent 955a64380c
commit ebb5f0802e
8 changed files with 101 additions and 82 deletions

View File

@@ -6,7 +6,7 @@ from typing import List, Tuple
from bs4 import BeautifulSoup, NavigableString, Tag, Comment
from access import Access
from livecarta_config import LawCartaConfig
from livecarta_config import LiveCartaConfig
def save_image_locally(img_file_path, img_content, book_id):
@@ -148,7 +148,7 @@ def _heading_tag2p_tag(body_tag):
"""
Function to convert all lower level headings to p tags
"""
pattern = f'^h[{LawCartaConfig.SUPPORTED_LEVELS + 1}-9]$'
pattern = f'^h[{LiveCartaConfig.SUPPORTED_LEVELS + 1}-9]$'
header_tags = body_tag.find_all(re.compile(pattern))
for tag in header_tags:
tag.name = 'p'