doxybook2
doxybook2 copied to clipboard
Anchor tag links generated incorrectly
If you have a heading that is something like "function my_function" then the anchor tag used by mkdocs and pandoc would be function-my_function but Doxybook2 generates the link function-my-function. The underscores get converted to dashes where they shouldn't be, so the links are broken.
Any news on this? Can any kind of pre or post-processor help with this?
In version 1.3.6 this is working without problems. I guess it was introduced with issue #63. Would be nice if the user could choose the behavior via a configuration option.
I don't think this has been fixed. I'm using version 1.4.0 in the workflow, and for a function such as wait_for_all, doxybook2 generates something like /futures/reference/Modules/group__waiting/#function-wait-for-all, which renders as this HTML with the link <a href="/futures/reference/Modules/group__waiting/#function-wait-for-all">...</a>.
If you look directly at the documentation, you'll see mkdocs generates the proper link on the sidebar, such as https://alandefreitas.github.io/futures/reference/Modules/group__waiting/#function-wait_for_all. The links in main table of functions only work in the docs because I included some js workaround to circumvent that problem temporarily.
Sorry I meant that the problem was introduced with fixing issue #63. Yes I also face the replacement problem with the latest version (1.4.0). But with 1.3.6 it was working.
Oh... OK. I thought it was working since 1.3.6. Yep. That makes sense.
I'll have a look at #65, but I'll not downgrade for now because I'm afraid to break something else.
If this is unmaintained for a long time and PRs are not being reviewed, I'll probably just fork and fix it locally.
I don't know if it helps people here, but I added this as a workaround in our docs build system:
perl -i -pe "s/(?<=md\#function\-)(.*)(?=\))/\$$1=~s#-#_#gr/ge" build/html/group* build/html/*8h*