Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
f78acaee0372aa18ca37ebab8d919acbe997bd1c
rust/src/test/rustdoc/intra-doc/anchors.rs

13 lines
231 B
Rust
Raw Normal View History

Add test for anchors
2019-11-23 18:45:55 +01:00
/// I want...
///
/// # Anchor!
pub struct Something;
Move `src/test/rustdoc` intra-doc link tests into a subdirectory They were starting to get unwieldy.
2020-11-28 20:25:41 -05:00
// @has anchors/struct.SomeOtherType.html
rustdoc: use more precise relative URLS Instead of using a depth counter and adding "../" to get to the top, this commit makes rustdoc actually compare the path of what it's linking from to the path that it's linking to. This makes the resulting HTML shorter. Here's a comparison of one of the largest (non-source) files in the Rust standard library docs (about 4% improvement before gzipping). $ wc -c struct.Wrapping.old.html struct.Wrapping.new.html 2387389 struct.Wrapping.old.html 2298538 struct.Wrapping.new.html Most if it can be efficiently gzipped away. $ wc -c struct.Wrapping.old.html.gz struct.Wrapping.new.html.gz 70679 struct.Wrapping.old.html.gz 70050 struct.Wrapping.new.html.gz But it also makes a difference in the final DOM size, reducing it from 91MiB to 82MiB.
2021-03-17 11:41:01 -07:00
// @has - '//a/@href' 'struct.Something.html#Anchor!'
Add test for anchors
2019-11-23 18:45:55 +01:00
/// I want...
///
/// To link to [Something#Anchor!]
pub struct SomeOtherType;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 348ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API