make_li dont li if blank
This commit is contained in:
parent
2c0d236b1c
commit
42d395aa7e
|
@ -6,7 +6,8 @@ def make_li(value):
|
||||||
lines = value.split("\n")
|
lines = value.split("\n")
|
||||||
ret = ''
|
ret = ''
|
||||||
for l in lines:
|
for l in lines:
|
||||||
ret += "<li>%s</li>" % l
|
if l.strip() != '':
|
||||||
|
ret += "<li>%s</li>" % l
|
||||||
return mark_safe(ret)
|
return mark_safe(ret)
|
||||||
|
|
||||||
register.filter("make_li", make_li)
|
register.filter("make_li", make_li)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user