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

Support for docs.rs links #17

Closed
jyn514 opened this issue Oct 28, 2020 · 2 comments
Closed

Support for docs.rs links #17

jyn514 opened this issue Oct 28, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jyn514
Copy link
Contributor

jyn514 commented Oct 28, 2020

I'd like to turn this link:

/// [`Span`]: https://docs.rs/tracing-core/latest/tracing_core/span/index.html

into this one:

/// [`Span`]: tracing_code::span

I think this should be fairly easy to add: if the URL starts with https://docs.rs, strip the host and first 2 path segments, then treat it like a normal link.

@poliorcetics
Copy link
Owner

Maybe a new option for this ? I can't think of some situation where one might want to link to docs.rs without having the linked crate as a dependency, but there might be one.

Maybe have the option to turn it off and have it on by default is better.

@poliorcetics poliorcetics self-assigned this Oct 28, 2020
@poliorcetics poliorcetics added the enhancement New feature or request label Oct 28, 2020
poliorcetics added a commit that referenced this issue Oct 29, 2020
Fixes #17.
Fixes small formatting issues.
@poliorcetics
Copy link
Owner

This should work now, and with lots of tests. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants