SCDoc: Links to named anchors seem not to be working

Before logging a bug – is there a problem with named anchors?

I was just trying to clarify firstArg documentation by adding a note to the <! section of the Operators overview file.

Then I wanted to link to it from Symbolic Notations. <! seemed to be problematic as the link target, so, in Operators, I did:

anchor:: firstArg
method:: <!
Return first argument.

Then See link::Overviews/Operators#firstArg#Operators:<!::... produces the right HTML: <a href="./../Overviews/Operators.html#firstArg">Operators:&lt;!</a>.

But in the help browser, clicking on this link doesn’t jump to the anchor.

hjh

I was hacking the bison and fkex SCDoc files not long ago.

Can you find the anchor definition in the HTML? Something similar to

<a id="firstArg"></a>

The link syntax looks correct, I don’t see anything strange.

Wait, <! resembles the start of some kind of declaration (like <!DOCTYPE>). Maybe that’s something along those lines. It makes the browser confused.

It’s rendered as &lt;!.

hjh

Yea looks correct given that &lt;! is encoded. If the anchor is defined with the correct identical ID, I don’t see the problem with what I can see.

@jamshark70
Sorry, I misunderstood your post. The problem with Operators | SuperCollider 3.12.2 Help is that none of the method names are accessible from TOC:
Dropbox - problem of Operators help document.mov - Simplify your life

@jamshark70
I fixed the bug and made a PR:

2 Likes

@jamshark70

After fixing the problem with the PR mentioned above, I have successfully made a link to <! method without an anchor with the following code:

link::#.<!::

a demo video:
https://www.dropbox.com/scl/fi/wxclvukwz9fmap4tomo8d/how-to-make-link-inside-Operators-help-document.mov?rlkey=tbw5ov6ntchwmuppm14y2y28u&dl=0

1 Like

@prko did you check if it breaks something else?

(Although it looks like a fix of a typo indeed), but be careful with the workarounds of an old bug/typo.
People do that too.

@smoge

Um…
I have not checked all the documents in the help file, but I have checked more than 10 help documents, including

  • Class
  • Reference
  • Guides
  • Tutorials
  • My own, including a soft-coded subsection written in Korean (section, subsection and subsubsection titles are also in Korean)

They all work correctly!

If you want to watch, I can post a video of me testing this functionality here.

If the way of testing the functionality is not correct, please let me know how to do it! I will check again according to your advice!

1 Like

no need to show

I don’t know it there are tests for SCDoc.

1 Like