From 7f4b35b8fe7ae91dea65fdebf2eacddb211f8d39 Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Mon, 19 Dec 2022 13:01:47 +0100 Subject: [PATCH] Indev for quotes --- src/var/lib/tyto/program/wip.py | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index ed3d993..9536b8a 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -310,26 +310,41 @@ def wip_quotes() : if quote_params(qline): continue - # paragraphs + # Paragraph [10] Open # Construct quote_html if qline.startswith(tyto.words_tags[10][0]): par_css = tyto.get_css(qline) - qline_html = '%s'%(tyto.words_tags[10][2]%par_css) - - if quote_html: quote_html = '%s\n%s'%(quote_html,qline_html) - else: quote_html = qline_html + if author: + qline_html = ' %s'%(tyto.words_tags[10][2]%par_css) + else: + qline_html = ' %s'%(tyto.words_tags[10][2]%par_css) + + if quote_html: + qquote_html = '%s\n%s'%(quote_html, qline_html) + else: + quote_html = '%s'%qline_html + continue + # Paragraph Close if qline.startswith(tyto.words_tags[10][1]): qline_html = tyto.words_tags[10][3] - quote_html = '%s\n%s'%(quote_html, qline_html) + if author: + quote_html = '%s\n %s'%(quote_html, qline_html) + else: + quote_html = '%s\n %s'%(quote_html, qline_html) continue # End of quote if qline.startswith(tyto.words_tags[11][1]): continue - if quote_html: quote_html = '%s\n%s'%(quote_html,qline) + # Add other lines + if quote_html: + if author: + quote_html = '%s\n %s'%(quote_html, qline) + else: + quote_html = '%s\n %s'%(quote_html, qline) else: quote_html = qline