html in wip: changes for bCode and brut. Added a span container
This commit is contained in:
parent
f2444a0441
commit
12427db5d1
|
@ -178,7 +178,7 @@ def wip_begin_markers(wip_lines):
|
|||
['^>>\s' , '<a id="%s"></a>' , True ],
|
||||
[r'^\($|\(\s' , '<p class="%s">' , True ],
|
||||
['^\)$|^\)\s' , '</p>' , False],
|
||||
['^\[\[$|^\[\[\s' , '<pre class="%s"' , True ],
|
||||
['^\[\[$|^\[\[\s' , '<pre class="%s">', True ],
|
||||
['^\]\]$|^\]\]\s' , '</pre>' , 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 = '<span class="ln">%s</span>'%ln + \
|
||||
'<span class="brut">%s</span>'%bline
|
||||
brut_line_html = '<span class="linecode">' + \
|
||||
'<span class="ln">%s</span>'%ln + \
|
||||
'<span class="brut">%s</span>'%bline + \
|
||||
'</span>'
|
||||
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 = '<span class="ln">%s</span>'%bCode_ln + \
|
||||
'<span class="brut">%s</span>'%line
|
||||
line = '<span class="linecode">' + \
|
||||
'<span class="ln">%s</span>'%bCode_ln + \
|
||||
'<span class="brut">%s</span>'%line + \
|
||||
'</span>'
|
||||
if bCode_lines: bCode_lines = '%s\n%s'%(bCode_lines, line)
|
||||
else : bCode_lines = line
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue