Fork me on GitHub
#cljdoc
<
2023-08-10
>
tengstrand09:08:38

I sometimes add an anchor/bookmarks like [#myheading] on the row above == myheading to make the link prettier (the generated begins with an underscore). This works fine, except for [#version] that doesn't generate a <h2 id="version" when I inspect the generated page. I tried to create an issue, but got this error from github:

lread10:08:07

I think GitHub might be having some issues? I got this error sporadically when accessing from a Private/Icognito window. If I shift-key + refreshed the page it sometimes corrected itself.

lread10:08:42

But back to your cljdoc issue. Ya, that seems very weird. I'll see if I can reproduce that locally.

👍 2
lread11:08:16

@U1G0HH87L I've not done an end-to-end test, but if I call internal adoc conversion on:

[#version]
== myheading
I get the following HTML:
<div class="sect1">
<h2 id="version"><a class="link" href="#version">myheading</a></h2>
<div class="sectionbody">

</div>
</div>
Which seems correct, right? Can you share your problematic adoc file with me?

tengstrand11:08:14

Sure, it's https://github.com/polyfy/polylith/blob/issue-318/doc/workspace-structure.adoc page. It works in github, but not when I run it locally.

lread17:08:14

I checked out your branch and did a local preview and I can reproduce the issue. If I drop to the console in my browser:

> document.getElementById('version')
<input id="version" class="pa2 mr2 br2 ba outline-0 blue" name="version" type="hidden" value="0.2.18-issue318-02">
This is a cljdoc generated hidden input element with an id of version to support the hidden rebuild button. So a link to #version is hitting that instead of your section header. I'll raise an issue to remind myself to fix.

👍 2