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:<!</a>
.
But in the help browser, clicking on this link doesn’t jump to the anchor.
hjh
smoge
April 29, 2024, 11:00pm
3
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.
smoge
April 29, 2024, 11:03pm
4
Wait, <!
resembles the start of some kind of declaration (like <!DOCTYPE>
). Maybe that’s something along those lines. It makes the browser confused.
smoge
April 29, 2024, 11:29pm
6
Yea looks correct given that <!
is encoded. If the anchor is defined with the correct identical ID, I don’t see the problem with what I can see.
prko
April 30, 2024, 12:45pm
8
prko
April 30, 2024, 10:49pm
9
@jamshark70
I fixed the bug and made a PR:
supercollider:develop
← prko:topic/fix_genericMethod_render_bug
opened 10:48PM - 30 Apr 24 UTC
A demo video of the fix of this PR:
https://www.dropbox.com/scl/fi/0t7kl9x6f5np… p1qcnintr/resolved-the-problem-of-Operators-help-document.mov?rlkey=8z3av3cfzacwmmgw377rm3atv&dl=0
## Purpose and Motivation
This fix the problem described in the following post in scsynth forum:
https://scsynth.org/t/scdoc-links-to-named-anchors-seem-not-to-be-working/4380/8
A demo video of the problem:
https://www.dropbox.com/scl/fi/1j70bx7qf0fschsj1bln7/problem-of-Operators-help-document.mov?rlkey=vkdvuj4w33h6z1l80zort9gdo&dl=0
## Types of changes
- Bug fix
## To-do list
- [x] Code is tested
- [x] All tests are passing
- [ ] Updated documentation
- [x] This PR is ready for review
2 Likes
prko
May 1, 2024, 12:00pm
10
@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
smoge
May 1, 2024, 12:03pm
11
@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.
prko
May 1, 2024, 12:22pm
12
@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
smoge
May 1, 2024, 12:24pm
13
no need to show
I don’t know it there are tests for SCDoc.
1 Like