html bookmark

main
Bob Mottram 2022-12-06 14:43:03 +00:00
parent 3d7418a4b6
commit 98366a17de
1 changed files with 1 additions and 1 deletions

View File

@ -385,7 +385,7 @@ def markdown_to_html(markdown: str) -> str:
for hsh, hashes in titles.items():
if line.startswith(hashes):
bookmark_str = line.lower().replace(' ', '-')
bookmark_str = line.split(' ', 1)[1].lower().replace(' ', '-')
line = line.replace(hashes, '').strip()
line = '<' + hsh + ' id="' + bookmark_str + '">' + \
line + '</' + hsh + '>\n'