fix heading in json

This commit is contained in:
shirshasa
2020-09-28 12:53:24 +03:00
parent 4853d2c49f
commit 95ceb1e089

View File

@@ -37,10 +37,10 @@ class JSONConverter:
:param ind: Index of header in content list.
"""
if self.content[ind].name in LawCartaConfig.SUPPORTED_HEADERS:
title = self.content[ind].text
title = self.content[ind]
curr_outline = int(re.sub(r"^h", "", self.content[ind].name)) # extract outline from tag
result = {
'title': title,
'title': f'{title}',
'contents': [],
'sub_items': []
}