fix(markdown): fix markdown code to pass newly added tests (#2774)
Signed-off-by: Jasstkn <jasssstkn@yahoo.com>
This commit is contained in:
committed by
GitHub
parent
c596faf219
commit
32c96c98ad
@@ -9,6 +9,12 @@ def parse(markdown):
|
|||||||
for i in lines:
|
for i in lines:
|
||||||
if re.match('###### (.*)', i) is not None:
|
if re.match('###### (.*)', i) is not None:
|
||||||
i = '<h6>' + i[7:] + '</h6>'
|
i = '<h6>' + i[7:] + '</h6>'
|
||||||
|
elif re.match('##### (.*)', i) is not None:
|
||||||
|
i = '<h5>' + i[6:] + '</h5>'
|
||||||
|
elif re.match('#### (.*)', i) is not None:
|
||||||
|
i = '<h4>' + i[5:] + '</h4>'
|
||||||
|
elif re.match('### (.*)', i) is not None:
|
||||||
|
i = '<h3>' + i[4:] + '</h3>'
|
||||||
elif re.match('## (.*)', i) is not None:
|
elif re.match('## (.*)', i) is not None:
|
||||||
i = '<h2>' + i[3:] + '</h2>'
|
i = '<h2>' + i[3:] + '</h2>'
|
||||||
elif re.match('# (.*)', i) is not None:
|
elif re.match('# (.*)', i) is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user