-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: Add anchors to section headers
This commit adds a appear-on-over link to all section headers to generated documentation. Each header also receives an id now, even those generated through markdown. The purpose of this is to provide easy to link to sections. This modifies the default header markdown generation because the default id added looks like "toc_NN" which is difficult to reconcile among all sections (by default each section gets a "toc_0" id), and it's also not very descriptive of where you're going. This chooses to adopt the github-style anchors by taking the contents of the title and hyphen-separating them (after lower casing). Closes #12681
- Loading branch information
1 parent
0a5138c
commit 31e7e67
Showing
4 changed files
with
105 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31e7e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from huonw
at alexcrichton@31e7e67
31e7e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/issue-12681 = 31e7e67 into auto
31e7e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/issue-12681 = 31e7e67 merged ok, testing candidate = 2153293
31e7e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4602
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/2444
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/2444
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4599
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3699
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3705
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4615
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3703
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3709
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4617
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3703
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3708
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3776
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1594
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4611
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3712
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3719
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4376
31e7e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 2153293