cargo-rdme icon indicating copy to clipboard operation
cargo-rdme copied to clipboard

Add support for `rustdoc` shorthand link syntax & deps bump

Open virtualritz opened this issue 7 months ago • 1 comments

Implemented recognition and processing of shorthand [`code`] patterns. These patterns are now properly handled for both link stripping and docs.rs link generation.

Changes:

  • Add detection of shorthand patterns like [function] in documentation.
  • Support stripping brackets from such patterns when using --intralinks-strip-links flag.
  • Generate proper docs.rs links for recognized shorthand patterns.
  • Bumped deps, small cargo_metadata update-related fix (sep. commit).

Used e.g. just now in dithereens README.md generated from shorthand links in its lib.rs.

virtualritz avatar Sep 09 '25 16:09 virtualritz

Fixed a bug in my impl. I've been using my fork w/o (other) issues now since Sep. 9, when I submitted this PR originally. I also added tests for this feature.

virtualritz avatar Oct 27 '25 14:10 virtualritz

@orium I'd love to see this PR merged

geeknoid avatar Dec 16 '25 13:12 geeknoid