Commit 94590f8e authored by senaps's avatar senaps Committed by Jiuli Gao

ul/ol fixed

parent 3d698a0e
...@@ -151,9 +151,9 @@ class Element: ...@@ -151,9 +151,9 @@ class Element:
elif tag == 'img_single_no_close': elif tag == 'img_single_no_close':
self.content = re.sub(pattern, '![](\g<1>)', self.content) self.content = re.sub(pattern, '![](\g<1>)', self.content)
elif self.tag == 'ul' and tag == 'li': elif self.tag == 'ul' and tag == 'li':
self.content = re.sub(pattern, '- \g<1>', self.content) self.content = re.sub(pattern, '- \g<1>\n', self.content)
elif self.tag == 'ol' and tag == 'li': elif self.tag == 'ol' and tag == 'li':
self.content = re.sub(pattern, '1. \g<1>', self.content) self.content = re.sub(pattern, '1. \g<1>\n', self.content)
elif self.tag == 'thead' and tag == 'tr': elif self.tag == 'thead' and tag == 'tr':
self.content = re.sub(pattern, '\g<1>\n', self.content.replace('\n', '')) self.content = re.sub(pattern, '\g<1>\n', self.content.replace('\n', ''))
elif self.tag == 'tr' and tag == 'th': elif self.tag == 'tr' and tag == 'th':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment