mirror of https://gitlab.com/bashrc2/epicyon
html bookmark
parent
3d7418a4b6
commit
98366a17de
|
@ -385,7 +385,7 @@ 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(' ', '-')
|
bookmark_str = line.split(' ', 1)[1].lower().replace(' ', '-')
|
||||||
line = line.replace(hashes, '').strip()
|
line = line.replace(hashes, '').strip()
|
||||||
line = '<' + hsh + ' id="' + bookmark_str + '">' + \
|
line = '<' + hsh + ' id="' + bookmark_str + '">' + \
|
||||||
line + '</' + hsh + '>\n'
|
line + '</' + hsh + '>\n'
|
||||||
|
|
Loading…
Reference in New Issue