Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librustdoc/html: recognize slices not to nest A tags.
1. A slice of parametrized type, say BorrowedRef { ... Vector(Generic(T)) }, is rendered as "<a href='primitive.slice.html'>&[T]</a>" 2. A slice of other types, say BorrowedRef { ... Vector(int) }, is rendered as "<a href='primitive.slice.html'>&[</a> <a href='primitive.int.html'>int</a> <a href='primitive.slice.html'>]</a>" 3. Other cases, say BorrowedRef { ... int }, are rendered as same as before: "&<a href='primitive.int.html'>int</a>" Relevant W3C specs: - http://www.w3.org/TR/html401/struct/links.html#h-12.2.2 12.2.2 Nested links are illegal - http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element states A tag must not enclose any "interactive contents" which include A tags themselves.
- Loading branch information
f40b60b
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 alexcrichton
at nodakai@f40b60b
f40b60b
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 nodakai/rust/rustdoc-dont-nest-a = f40b60b into auto
f40b60b
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.
nodakai/rust/rustdoc-dont-nest-a = f40b60b merged ok, testing candidate = 519e85b
f40b60b
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/1751
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1748
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1742
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1748
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1745
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1744
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1744
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1748
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1742
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1741
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1744
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1402
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1399
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1402
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/239
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/239
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-c/builds/233
f40b60b
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 = 519e85b