From 12427db5d1f400f1e4db82f860ed7b182ade3c7d Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Sat, 3 Dec 2022 16:11:38 +0100 Subject: [PATCH] html in wip: changes for bCode and brut. Added a span container --- src/var/lib/tyto/program/wip.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index 98bba8c..60d03ec 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -178,7 +178,7 @@ def wip_begin_markers(wip_lines): ['^>>\s' , '' , True ], [r'^\($|\(\s' , '

' , True ], ['^\)$|^\)\s' , '

' , False], - ['^\[\[$|^\[\[\s' , '
', True ],
                 ['^\]\]$|^\]\]\s'   , '
' , False] ] @@ -624,8 +624,10 @@ def wip_bruts(article): # Convert each lines to HTML, add to string for ln, bline in enumerate(brut_datas.rsplit('\n'), 1): - brut_line_html = '%s'%ln + \ - '%s'%bline + brut_line_html = '' + \ + '%s'%ln + \ + '%s'%bline + \ + '' if brut_html: brut_html = '%s\n%s'%(brut_html,brut_line_html) else : brut_html = brut_line_html @@ -678,8 +680,10 @@ def convert_bcodes(article, fm, lm, css): if bCode: bCode_ln += 1 - line = '%s'%bCode_ln + \ - '%s'%line + line = '' + \ + '%s'%bCode_ln + \ + '%s'%line + \ + '' if bCode_lines: bCode_lines = '%s\n%s'%(bCode_lines, line) else : bCode_lines = line else: