about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2018-11-24Don't show file sidebar by defaultGuillaume Gomez-6/+6
2018-11-24Source sidebar improvementsGuillaume Gomez-60/+86
2018-11-24Add source file sidebarGuillaume Gomez-63/+384
2018-11-21Fixes primitive sidebar link generationGuillaume Gomez-30/+57
2018-11-21Improve no result found sentence in doc searchGuillaume Gomez-6/+22
2018-11-15Rollup merge of #55926 - cynecx:fix-rustdoc-mobile-css, r=GuillaumeGomezPietro Albini-1/+1
Change sidebar selector to fix compatibility with docs.rs Fix for #55883.
2018-11-13Change sidebar selector to fix compatibility with docs.rscynecx-1/+1
2018-11-13Rollup merge of #55136 - GuillaumeGomez:short-doc, r=QuietMisdreavuskennytm-32/+53
Remove short doc where it starts with a codeblock Fixes #54975.
2018-11-13Rollup merge of #55858 - GuillaumeGomez:fixes-rustdoc-codeblocks, ↵kennytm-4/+9
r=QuietMisdreavus Small fixes on code blocks in rustdoc It currently has a little margin issue with the `i` and there were js errors. r? @QuietMisdreavus
2018-11-11Rollup merge of #55856 - QuietMisdreavus:static-discharge, r=GuillaumeGomezkennytm-25/+136
rustdoc: refactor: move all static-file include!s into a single module This is a smaller refactor that creates a new module `rustdoc::html::static_files`, which contains a bunch of `static` variables with all the files in `html/static` that we use. The idea behind moving them all here was to remove the duplicate `include_bytes!()` that are used by the theme-checker code. It also continues to centralize more operations in rustdoc.
2018-11-10move all static-file include!s into a single moduleQuietMisdreavus-25/+136
2018-11-10Small fixes on code blocks in rustdocGuillaume Gomez-4/+9
2018-11-10Remove short doc where it starts with a codeblockGuillaume Gomez-32/+53
2018-11-07Remove intermediate font specsJon Gjengset-5/+5
This is a (much) more constrained version of #54772 that also aims at improving the situation in #34681. It removes any font specifications that are not the "official" rustdoc font, and instead relies on the browser to provide the fallback font if the official on is not available. On Linux systems, this is particularly important, as fonts like Helvetica, Arial, and Times often look pretty bad since they're pulled from extracted MS fonts. A specification like `serif` or `sans-serif` lets the browser instead choose a good font.
2018-11-05Auto merge of #55515 - QuietMisdreavus:rustdoc-config, r=GuillaumeGomezbors-48/+43
rustdoc: refactor: centralize all command-line argument parsing This is something i've wanted to do for a while, since we keep having to add new arguments to places like `rust_input` or `core::run_core` whenever we add a new CLI flag or the like. Those functions have inflated up to 11-19, and in some cases hiding away the locations where some CLI flags were being parsed, obscuring their use. Now, we have a central place where all command-line configuration occurs, including argument validation. One note about the design: i grouped together all the arguments that `html::render::run` needed, so that i could pass them on from compilation in one lump instead of trying to thread through individual items or clone the entire blob ahead of time. One other thing this adds is that rustdoc also now recognizes all the `-Z` options that rustc does, since we were manually grabbing a few previously. Now we parse a full `DebuggingOptions` struct and hand it directly to rustc when scraping docs.
2018-11-04add Debug impls for the Options structsQuietMisdreavus-1/+1
2018-11-03Rollup merge of #54162 - GuillaumeGomez:hide-default-impls-items, ↵Guillaume Gomez-41/+116
r=QuietMisdreavus Hide default impls items Follow up of #51885. Fixes #54025. cc @Mark-Simulacrum r? @QuietMisdreavus And screenshots of course: <img width="1440" alt="screen shot 2018-09-12 at 23 30 35" src="https://user-images.githubusercontent.com/3050060/45454424-1ff8d500-b6e4-11e8-9257-030322495d58.png"> <img width="1440" alt="screen shot 2018-09-12 at 23 30 42" src="https://user-images.githubusercontent.com/3050060/45454431-2424f280-b6e4-11e8-8d65-db0d85ac18f0.png">
2018-11-02pass the Options struct instead of individual argsQuietMisdreavus-49/+42
2018-11-02split off a separate RenderOptions structQuietMisdreavus-2/+2
2018-11-02swap uses of Matches with pre-parsed argsQuietMisdreavus-8/+10
2018-11-02Auto merge of #54543 - GuillaumeGomez:top-level-index, r=QuietMisdreavusbors-12/+74
Add index page argument @Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything? r? @QuietMisdreavus
2018-10-30Fix invalid "expand description" displayGuillaume Gomez-8/+9
2018-10-29Fix source code pages in rustdocGuillaume Gomez-2/+5
2018-10-29Rollup merge of #55440 - xfix:patch-11, r=GuillaumeGomezPietro Albini-5/+0
Remove unreachable code in hasClass function in Rustdoc
2018-10-28Remove unreachable code in hasClass function in RustdocKonrad Borowski-5/+0
2018-10-27Fix sub-variant doc displayGuillaume Gomez-17/+39
2018-10-26Rollup merge of #55358 - sinkuu:redundant_clone2, r=estebankkennytm-4/+4
Remove redundant clone (2)
2018-10-26Rollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavuskennytm-14/+68
Add line numbers option to rustdoc Fixes #22878. r? @QuietMisdreavus
2018-10-26Remove redundant cloneShotaro Yamada-4/+4
2018-10-22Fix multiple errorsGuillaume Gomez-8/+19
2018-10-21improve search tabs lookGuillaume Gomez-23/+14
2018-10-21Fix script to avoid displaying unnecessary itemsGuillaume Gomez-4/+8
2018-10-21Hide items if they use default docsGuillaume Gomez-27/+85
2018-10-21Improve stability messages display a bitGuillaume Gomez-12/+14
2018-10-21Use markdown::render instead of using pulldown_cmark directlyGuillaume Gomez-29/+21
2018-10-21Add index pageGuillaume Gomez-6/+76
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-10/+10
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-15/+15
2018-10-18Auto merge of #54349 - GuillaumeGomez:no-example-lint, r=QuietMisdreavusbors-2/+4
[rustdoc] Add lint for doc without codeblocks Fixes #53805. r? @QuietMisdreavus
2018-10-18Rollup merge of #55161 - akxcv:rustdoc/disable-spellcheck, ↵kennytm-0/+1
r=QuietMisdreavus,GuillaumeGomez [librustdoc] Disable spellcheck for search field This disables spellchecking for the search field in the rustdoc web interface. As someone who uses Safari to browse through Rust docs, spellchecking gets really annoying.
2018-10-18Rollup merge of #55080 - thanatos:fix-localstorage-crash, r=GuillaumeGomezkennytm-2/+20
Detect if access to localStorage is forbidden by the user's browser If the user's cookie/persistent storage setting forbid access to `localStorage`, catch the exception and abort the access. Currently, attempting to use the expand/contract links at the top of the page for structs/consts/etc. fails due to an unhandled error while accessing `localStorage`, if such access is forbidden, as the exception from the failed access propagates all the way out, interrupting the expand/contract. Instead, I would like to degrade gracefully; the access won't happen (the collapse/expand state won't get persisted) but the actual expanding/contracting of the item will go on to succeed. Fixes #55079
2018-10-17[librustdoc] Disable spellcheck for search fieldAlexander Komarov-0/+1
2018-10-16Move usableLocalStorage() above functions that make use of itRoy Wellington Ⅳ-15/+15
2018-10-15Extract localStorage tests out into a helper method; use in getCurrentValue()Roy Wellington Ⅳ-8/+20
1. Extract the tests for whether or not we have workable localStorage out into a helper method, so it can be more easily reused 2. Use it in getCurrentValue() too, for the same reasons, as suggested in code review
2018-10-14Detect if access to localStorage is forbidden by the user's browserRoy Wellington Ⅳ-0/+6
If the user's cookie/persistent storage setting forbid access to localStorage, catch the exception and abort the access. Currently, attempting to use the expand/contract links at the top of the page for structs/consts/etc. fails due to an unhandled error while accessing localStorage, if such access is forbidden, as the exception from the failed access propagates all the way out, interrupting the expand/contract. Instead, I would like to degrade gracefully; the access won't happen (the collapse/expand state won't get persisted) but the actual expanding/contracting of the item will go on to succeed. Fixes #55079
2018-10-15rustdoc: Use dyn keyword when rendering dynamic traitsOliver Middleton-0/+3
The dyn keyword has been stable for a while now so rustdoc should start using it.
2018-10-12Rollup merge of #54869 - GuillaumeGomez:fix-mobile-docs, r=QuietMisdreavuskennytm-15/+27
Fix mobile docs Fixes #54836. <img width="1440" alt="screen shot 2018-10-06 at 18 53 19" src="https://user-images.githubusercontent.com/3050060/46573683-1b4cd700-c999-11e8-9e6b-86a23b332e22.png"> r? @QuietMisdreavus
2018-10-12Auto merge of #53933 - GuillaumeGomez:codeblock-error-display, r=QuietMisdreavusbors-7/+18
Improve error display for codeblocks in rustdoc Part of #53919. r? @QuietMisdreavus
2018-10-11Fix mobile doc displayGuillaume Gomez-15/+27
2018-10-09Add line numbers option to rustdocGuillaume Gomez-14/+68