Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links defined in anchors section in bikeshed classified as "autolinks" #1584

Open
dontcallmedom opened this issue Jun 6, 2024 · 2 comments

Comments

@dontcallmedom
Copy link
Member

in #1518 we started distinguishing between rawlinks and autolinks to simplify and reduce false positive in broken link detection in strudy.

I realized today that the heuristic to distinguish between the two is not working so well for bikeshed: links that are defined in <pre class='anchors'> sections get classified as autolinks whereas in fact they're manually maintained URLs.

I don't think there is an easy way to fix this short of changing bikeshed to markup these links differently.

(conversely, if/when we fix it, we would be able to detect systematically links that are defined in anchors section but don't need to be)

@dontcallmedom
Copy link
Member Author

conversely, bikeshed generates links for the automatically generated index sections without data-link-type; this could either be fixed upstream (probably preferable), or reffy could be automatically classify as autolinks links it finds in ul.index elements.

@tidoust
Copy link
Member

tidoust commented Aug 22, 2024

conversely, bikeshed generates links for the automatically generated index sections without data-link-type; this could either be fixed upstream (probably preferable), or reffy could be automatically classify as autolinks links it finds in ul.index elements.

I note that, in some specs, the asides appear after the ul.index elements, probably because the build was made with an older version of Bikeshed. For example, see index in WebXR Lighting Estimation

We could probably exclude aside elements that have a dfn-panel class from links extraction altogether: they do not contain any link that does not already appear somewhere else in the spec.

tidoust added a commit that referenced this issue Aug 22, 2024
Via #1584 (comment).

Aside dfn panels only contain links that already appear somewhere else in the
spec.

These links were extracted and categorized as `autolinks` when they appeared in
the final index of a Bikeshed spec, which essentially did not do anything
because the links had already been extracted as `autolinks` in any case.

The problem is that Respec also uses similar panels (but no `<aside>`), and
Bikeshed sometimes outputs the panels at the end of the document, and not
within the index itself as expected in the code. In these situations, the
links were extracted a second time, as `rawlinks`. Not extracting the panels
avoids duplication entirely.
tidoust added a commit that referenced this issue Aug 22, 2024
Via #1584 (comment).

Aside dfn panels only contain links that already appear somewhere else in the
spec.

These links were extracted and categorized as `autolinks` when they appeared in
the final index of a Bikeshed spec, which essentially did not do anything
because the links had already been extracted as `autolinks` in any case.

The problem is that Respec also uses similar panels (but no `<aside>`), and
Bikeshed sometimes outputs the panels at the end of the document, and not
within the index itself as expected in the code. In these situations, the
links were extracted a second time, as `rawlinks`. Not extracting the panels
avoids duplication entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants