Open dfoxfranke opened 3 years ago
IIUC intra-doc links are implemented as just constructing a link based on the path to the item, with no styling applied. In other words, they're equivalent to the old-style [Foo](../foo/struct.Foo.html)
links. Thus I'm marking this as a feature request.
Yes, come to think of it, that raises a question: what to do with old-style links? I can think of a few possibilities and they all seem reasonable:
I think we would like go with (1); the other two seem like they would take a lot of work for not much benefit.
FWIW there is an issue open for 3, and that would be my preference: https://github.com/rust-lang/rust/issues/75805
If you are going to detect the target of a link, why require the backticks for monospacing at all, when the target is an item?
@detly the backticks would not be required. Backticks mean the item should be highlighted as code, so rustdoc uses a monospace font for them already.
Rustdoc generally has fairly consistent ways of styling documentation items. For example, in the default Light theme, structs are magenta, traits are lavender, functions and methods are gold, etc., and are always set in a sans-serif or monospace font. However, this convention does not seem to get applied to intra-documentation links.
Right now, if I write
the link will be blue and set in serifs; if I write
it'll be blue and set in monospace.
It would be more attractive and consistent for
[Result]
to be set in magenta sans-serif, and[`Result`]
to be set in magenta monospace.