Skip to content
Snippets Groups Projects
Commit 4f06516a authored by Mikhail Vanyulin's avatar Mikhail Vanyulin Committed by Jonas Höppner
Browse files

convert_md2html: fix id fields for headings


Converter adds "user-content-" to "id" fields for headings.
As a result links from TOC do not work.
Fix this for now by removing "user-content-" from the resulting html.

Signed-off-by: default avatarMikhail Vanyulin <mikhail.vanyulin@rtsoft.de>
parent 97898e9e
No related branches found
No related tags found
1 merge request!382convert_md2html: use gitlab api
Pipeline #111621 passed with stage
in 30 minutes and 55 seconds
...@@ -223,6 +223,9 @@ def main(): ...@@ -223,6 +223,9 @@ def main():
fout.write(HEADER) fout.write(HEADER)
html = gitlab.markdown(fin.read(), True, args.project) html = gitlab.markdown(fin.read(), True, args.project)
# Fix TOC links by removing "user-content-" from id fields in
# headings
fout.write(html.replace("user-content-", ""))
fout.write(html) fout.write(html)
fout.write(FOOTER) fout.write(FOOTER)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment