| Age | Commit message (Collapse) | Author | Lines |
|
A major discoverability issue with rustdoc is that all crates have their
documentation built in isolation, so it's difficult when looking at the
documentation for libstd to learn that there's a libcollections crate with a
HashMap in it.
This commit moves rustdoc a little closer to improving the multiple crate
experience. This unifies all search indexes for all crates into one file so all
pages share the same search index. This allows searching to work across crates
in the same documentation directory (as the standard distribution is currently
built).
This strategy involves updating a shared file amongst many rustdoc processes, so
I implemented a simple file locking API for handling synchronization for updates
to the shared files.
cc #12554
|
|
Previously the :hover rules were making the links to the traits/types in
something like
impl<K: Hash + Eq, V> ... { ... }
be displayed with a trailing `§` when hovered over. This commit
restricts that behaviour to specific headers, i.e. those that are known
to be section headers (like those rendered in markdown doc-comments, and
the "Modules", "Functions" etc. headings).
|
|
- fixup and refactor highlighting code
- have a proper print stylesheet
|
|
This avoids having to include JS in the guide/tutorial/manual pages just
to get the headers being links. The on-hover behaviour showing the
little section marker § is preserved, because that gives a useful hint
that the heading is a link.
|
|
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
|
|
|
|
Macro definitions are just their raw source code, and so should be
highlighted where possible. Also, $ident non-terminal substitutions are
special, and so are worth of a little special treatment.
|
|
|
|
This adds simple syntax highlighting based off libsyntax's lexer to be sure to
stay up to date with rust's grammar. Some of the highlighting is a bit ad-hoc,
but it definitely seems to get the job done!
This currently doesn't highlight rustdoc-rendered function signatures and
structs that are emitted to each page because the colors already signify what's
clickable and I think we'd have to figure out a different scheme before
colorizing them. This does, however, colorize all code examples and source code.
Closes #11393
|
|
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
|
|
|
|
This helps figure out where you actually jumped to, especially if the thing you
jumped to is at the very bottom of the page.
Closes #9905
|
|
|
|
This change adds two improvements to docs searching functionality.
First, search results will immediately be displayed when a ?search=searchterm
query string parameter is provided to any docs url.
Second, search results are now inserted into the browser history, allowing for
easier navigation between search results and docs pages.
|
|
closes #10535
|
|
Made temporary changes to include multiple keywords in rustdoc search
Implemented search based on multiple keywords
Added some commenting and house cleaning
Added path searching to rustdoc
|
|
Now with broader compatibility.
|
|
CodeMirror parser errors are related to #9873.
|
|
Closes #10330.
|
|
Commits have all the fun details.
|
|
Closes #9862
|
|
|
|
|
|
|
|
When a key is pressed and held, this now does the OS-style repeating after a bit
of a pause. Also fixes the width of search results to be correct (was changed
beforehand and didn't catch this).
|
|
All items have source links back to their actual code. Source files can be
omitted with the doc(html_no_source) attribute on the crate. Currently there is
no syntax highlighting, but that will come with syntax highlighting with all
other snippets.
Closes #2072
|
|
|
|
It's just a waste of disk space and it can be done just as well in JS.
|
|
Closes #8965
|
|
Closes #9460
|
|
Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng
suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.
|