fix(markdown): fix markdown code to pass newly added tests (#2774)

Signed-off-by: Jasstkn <jasssstkn@yahoo.com>
This commit is contained in:
Maria Kotlyarevskaya
2021-11-15 21:45:43 +03:00
committed by GitHub
parent c596faf219
commit 32c96c98ad

View File

@@ -9,6 +9,12 @@ def parse(markdown):
for i in lines:
if re.match('###### (.*)', i) is not None:
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:
i = '<h2>' + i[3:] + '</h2>'
elif re.match('# (.*)', i) is not None: