5 Commits

Author SHA1 Message Date
binarycat
6a7d4882a2 rustdoc::broken_intra_doc_links: only be lenient with shortcut links
collapsed links and reference links have a pretty particular syntax,
it seems unlikely they would show up on accident.

Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2025-07-24 11:17:14 -05:00
binarycat
041348110e rustdoc: update tests to match new lint behavior 2025-07-24 11:17:14 -05:00
binarycat
87d7d80cec adjust more unit tests to reflect more aggressive intra-doc linting 2025-07-24 11:17:13 -05:00
Michael Howell
61a97448e5 rustdoc: improve refdef handling in the unresolved link lint
This commit takes advantage of a feature in pulldown-cmark that
makes the list of link definitions available to the consuming
application. It produces unresolved link warnings for refdefs
that aren't used, and can now produce exact spans for the dest
even when it has escapes.
2025-02-15 12:21:35 -07:00
Michael Howell
1a77d9a54d rustdoc: get unnormalized link destination for suggestions
Fixes #110111

This bug, and the workaround in this commit, is closely linked to
[raphlinus/pulldown-cmark#441], getting offsets of link
components. In particular, pulldown-cmark doesn't provide the
offsets of the contents of a link.

To work around this, rustdoc parser parts of a link definition
itself.

[raphlinus/pulldown-cmark#441]: https://github.com/raphlinus/pulldown-cmark/issues/441
2023-05-26 18:38:46 -07:00