Fixes : line number mismatch with icode check. + wip_images()
This commit is contained in:
parent
2f0b03c656
commit
c2c1a4c8e1
|
@ -372,7 +372,7 @@ def if_icodes_bcodes_quotes(post_bottom):
|
|||
icode_m2 = line.count(tyto.words_tags[9][1])
|
||||
if icode_m1 != icode_m2:
|
||||
logs.out("8", 'L=%s. icode "%s" + "%s" > %s'%(
|
||||
ln + ln_header,
|
||||
ln + 1 + ln_header,
|
||||
tyto.words_tags[9][0], tyto.words_tags[9][1],
|
||||
db.uri_file
|
||||
), False
|
||||
|
|
|
@ -65,8 +65,11 @@ def manage(target):
|
|||
'stats' : stats.manage
|
||||
}
|
||||
|
||||
do[target]('wip')
|
||||
return
|
||||
try:
|
||||
do[target]('wip')
|
||||
return
|
||||
except:
|
||||
logs.out("28", '%s + %s'%(args.action, target), True)
|
||||
|
||||
|
||||
# Per article with target
|
||||
|
@ -396,8 +399,14 @@ def get_wh_image(value):
|
|||
def wip_images():
|
||||
if db.uniq_images == 0: return
|
||||
|
||||
image_link = '<a class="%s" href="%s">%s</a>'
|
||||
image_show = '<img class="%s" src="%s" alt="%s" title="%s"%s />'
|
||||
image_link = \
|
||||
'<a class="%s"\n' + \
|
||||
' href="%s">%s</a>'
|
||||
image_show = \
|
||||
'<img class="%s"\n' + \
|
||||
' src="%s"\n' + \
|
||||
' alt="%s"\n' + \
|
||||
' title="%s"%s />'
|
||||
|
||||
# Check each line
|
||||
for ln, line in enumerate(post_bottom.rsplit('\n')):
|
||||
|
@ -461,7 +470,7 @@ def wip_images():
|
|||
# Set HTML to replace line number
|
||||
image_html = image_tgt%image_src
|
||||
|
||||
replace_in_post(post_bottom.rsplit('\n')[ln],
|
||||
replace_in_post(line,
|
||||
image_html
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue