This commit is contained in:
unkn0w7n 2023-08-10 09:59:34 +05:30
parent 0d825ec9bc
commit 6d93f94e80
2 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ def get_contents(x):
return '<b>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</b>'
if 'emphasis' in x['attributes']:
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
return x.get('value', '') + ''.join(map(get_contents, x.get('content', '')))
return x.get('value', '') + ''.join(map(get_contents, x.get('content', '')))
elif otype == 'br':
return '<br>'

View File

@ -15,6 +15,7 @@ def get_contents(x):
return '<b>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</b>'
if 'emphasis' in x['attributes']:
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
return x.get('value', '') + ''.join(map(get_contents, x.get('content', '')))
return x.get('value', '') + ''.join(map(get_contents, x.get('content', '')))
elif otype == 'br':
return '<br>'