forked from LiveCarta/BookConverter
Fix span wrapper processing
This commit is contained in:
@@ -67,14 +67,14 @@ class ChapterItem:
|
||||
for i in self.sub_items:
|
||||
sub_dicts.append(i.to_dict(lvl + 1))
|
||||
|
||||
if lvl > LiveCartaConfig.SUPPORTED_LEVELS:
|
||||
if lvl > LiveCartaConfig.NUM_SUPPORTED_LEVELS:
|
||||
return {
|
||||
"title": self.title,
|
||||
"contents": [self.content] + [x['contents'] for x in sub_dicts],
|
||||
"sub_items": []
|
||||
}
|
||||
|
||||
if (lvl == LiveCartaConfig.SUPPORTED_LEVELS) and sub_dicts:
|
||||
if (lvl == LiveCartaConfig.NUM_SUPPORTED_LEVELS) and sub_dicts:
|
||||
return {
|
||||
"title": self.title,
|
||||
"contents": [self.content] + flatten([x['contents'] for x in sub_dicts]),
|
||||
|
||||
Reference in New Issue
Block a user