contrib/html: properly handle anchors

This commit is contained in:
Christian Hesse 2025-11-07 22:34:00 +01:00
parent 843347dafe
commit f41ed5b1f5

View file

@ -11,7 +11,7 @@ sed \
< "${0}.d/head.html" < "${0}.d/head.html"
markdown -f toc,idanchor "${1}" | sed \ markdown -f toc,idanchor "${1}" | sed \
-e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' -e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|'
printf '</body></html>' printf '</body></html>'