This commit is contained in:
unkn0w7n 2023-09-30 23:07:41 +05:30
parent dc586547ce
commit bd9cd519f6
3 changed files with 9 additions and 9 deletions

View File

@ -48,7 +48,7 @@ def parse_body(item):
if item.get('type') == 'inline': if item.get('type') == 'inline':
if c.get('cmsType') == 'listicle': if c.get('cmsType') == 'listicle':
if 'title' in c: if 'title' in c:
yield '<h3>' + escape(c['title']) + "</h3>" yield '<h3>' + escape(c['title']) + '</h3>'
yield c['text'] yield c['text']
elif c.get('cmsType') == 'image': elif c.get('cmsType') == 'image':
for line in parse_lead_image(c): for line in parse_lead_image(c):
@ -59,10 +59,10 @@ def parse_body(item):
yield line yield line
elif c.get('cmsType') == 'pullquote': elif c.get('cmsType') == 'pullquote':
if 'quote' in c: if 'quote' in c:
yield '<blockquote>' + c['quote'] + "</blockquote>" yield '<blockquote>' + c['quote'] + '</blockquote>'
elif c.get('cmsType') == 'editorsNote': elif c.get('cmsType') == 'editorsNote':
if 'note' in c: if 'note' in c:
yield '<blockquote>' + c['note'] + "</blockquote>" yield '<blockquote>' + c['note'] + '</blockquote>'
else: else:
if c['mrkup'].strip().startswith('<'): if c['mrkup'].strip().startswith('<'):
yield c['mrkup'] yield c['mrkup']

View File

@ -47,7 +47,7 @@ def parse_body(item):
if item.get('type') == 'inline': if item.get('type') == 'inline':
if c.get('cmsType') == 'listicle': if c.get('cmsType') == 'listicle':
if 'title' in c: if 'title' in c:
yield '<h3>' + escape(c['title']) + "</h3>" yield '<h3>' + escape(c['title']) + '</h3>'
yield c['text'] yield c['text']
elif c.get('cmsType') == 'image': elif c.get('cmsType') == 'image':
for line in parse_lead_image(c): for line in parse_lead_image(c):
@ -58,10 +58,10 @@ def parse_body(item):
yield line yield line
elif c.get('cmsType') == 'pullquote': elif c.get('cmsType') == 'pullquote':
if 'quote' in c: if 'quote' in c:
yield '<blockquote>' + c['quote'] + "</blockquote>" yield '<blockquote>' + c['quote'] + '</blockquote>'
elif c.get('cmsType') == 'editorsNote': elif c.get('cmsType') == 'editorsNote':
if 'note' in c: if 'note' in c:
yield '<blockquote>' + c['note'] + "</blockquote>" yield '<blockquote>' + c['note'] + '</blockquote>'
else: else:
if c['mrkup'].strip().startswith('<'): if c['mrkup'].strip().startswith('<'):
yield c['mrkup'] yield c['mrkup']

View File

@ -49,7 +49,7 @@ def parse_body(item):
if item.get('type') == 'inline': if item.get('type') == 'inline':
if c.get('cmsType') == 'listicle': if c.get('cmsType') == 'listicle':
if 'title' in c: if 'title' in c:
yield '<h3>' + escape(c['title']) + "</h3>" yield '<h3>' + escape(c['title']) + '</h3>'
yield c['text'] yield c['text']
elif c.get('cmsType') == 'image': elif c.get('cmsType') == 'image':
for line in parse_lead_image(c): for line in parse_lead_image(c):
@ -60,10 +60,10 @@ def parse_body(item):
yield line yield line
elif c.get('cmsType') == 'pullquote': elif c.get('cmsType') == 'pullquote':
if 'quote' in c: if 'quote' in c:
yield '<blockquote>' + c['quote'] + "</blockquote>" yield '<blockquote>' + c['quote'] + '</blockquote>'
elif c.get('cmsType') == 'editorsNote': elif c.get('cmsType') == 'editorsNote':
if 'note' in c: if 'note' in c:
yield '<blockquote>' + c['note'] + "</blockquote>" yield '<blockquote>' + c['note'] + '</blockquote>'
else: else:
if c['mrkup'].strip().startswith('<'): if c['mrkup'].strip().startswith('<'):
yield c['mrkup'] yield c['mrkup']