Announcing cargo-intraconv to easily convert to intra-doc links with Rust 1.48

Hello !

Rust 1.48 is now stable and intra-doc links are available !

To quickly reiterate on what they are, they let you change how you write links in
documentation from this: [Bar]: ../bar/struct.Bar.html to this [Bar]: crate::bar::Bar.

This transformation improves both readability and maintainability but it's boring and may be error prone when there are hundreds of links in a bigger crate.

To help with this, here is cargo-intraconv.

This tool will help you convert existing documentation link to intra-doc links automatically with features such as crate-name discovery, the ability to ignore links, to display changes as they are done, specify a crate name and remove links that, after the transformation, point to local items.

See the README for more information !

Finally, huge thanks to @jyn514 for their help with this, they ran it on real-world examples and found so many bugs before 1.48 !

11 Likes

Darn, I wish I had seen this sooner. I just got finished doing the replacement by hand across my libs :stuck_out_tongue:

2 Likes

Maybe I should have promoted it sooner, sorry for that !

1 Like