mirror of https://gitlab.com/bashrc2/epicyon
Bookmark formatting
parent
14d64ea272
commit
3d7418a4b6
|
@ -385,8 +385,10 @@ def markdown_to_html(markdown: str) -> str:
|
||||||
|
|
||||||
for hsh, hashes in titles.items():
|
for hsh, hashes in titles.items():
|
||||||
if line.startswith(hashes):
|
if line.startswith(hashes):
|
||||||
|
bookmark_str = line.lower().replace(' ', '-')
|
||||||
line = line.replace(hashes, '').strip()
|
line = line.replace(hashes, '').strip()
|
||||||
line = '<' + hsh + ' id="' + line + '">' + line + '</' + hsh + '>\n'
|
line = '<' + hsh + ' id="' + bookmark_str + '">' + \
|
||||||
|
line + '</' + hsh + '>\n'
|
||||||
ctr = -1
|
ctr = -1
|
||||||
break
|
break
|
||||||
html_str += line
|
html_str += line
|
||||||
|
|
Loading…
Reference in New Issue