build: include <ul> in text panels
This commit is contained in:
parent
358314e4cd
commit
2d58ddf640
|
@ -61,6 +61,9 @@ with open(dummy_file, 'r') as read_file, open(dest_file, 'w') as write_file:
|
|||
# extract images from their enclosing <p> tags and put them in img panels
|
||||
html = re.sub('(<p>(<img(?:.+)/>)</p>)', r'<div class="img-panel">\2</div>', html)
|
||||
|
||||
# wrap <ul> elements with <p> to get them into blocks
|
||||
html = re.sub('(<ul>(\n|.)*</ul>)', r'<p>\1</p>', html)
|
||||
|
||||
# insert text-panel start between non-<p> and <p> elements
|
||||
html = re.sub('((?<!</p>)\n)(<p>)', r'\1<div class="text-panel">\n\2', html)
|
||||
# insert para-block end between <p> and non-<p> elements
|
||||
|
|
Loading…
Reference in New Issue