rust/src/librustdoc
Matthias Krüger 51aa20de07
Rollup merge of #92801 - jsha:overflow-wrap, r=GuillaumeGomez
Enable wrapping words by default

Faced with a very long word, browsers will let it overflow its
box horizontally rather than break it in the middle. We essentially
never want that behavior. We would rather break the word and keep it
inside its horizontal limits. So we apply a default overflow-wrap:
break-word/anywhere to the document as a while.

In some contexts we would rather add a horizontal scrollbar (code
blocks), or elide the excess text with an ellipsis (sidebar). Those
still work as expected.

Fixes #92771

[Some related discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/wrap.20.2F.20overflow.20.2F.20scroll) and a related issue: #92421.

Demo: https://rustdoc.crud.net/jsha/overflow-wrap/std/iter/trait.Iterator.html#method.try_find

r? ``@GuillaumeGomez``
2022-01-17 20:07:05 +01:00
..
clean Auto merge of #92805 - BoxyUwU:revert-lazy-anon-const-substs, r=lcnr 2022-01-16 11:19:21 +00:00
doctest Rename TestOptions to GlobalTestOptions 2021-12-12 17:46:19 -08:00
formats rustdoc: avoid many Symbol to String conversions. 2022-01-14 11:57:18 -08:00
html Rollup merge of #92801 - jsha:overflow-wrap, r=GuillaumeGomez 2022-01-17 20:07:05 +01:00
json rustdoc: avoid many Symbol to String conversions. 2022-01-14 11:57:18 -08:00
passes Rollup merge of #92799 - rust-lang:followup-from-92533, r=Aaron1011 2022-01-17 06:08:11 +01:00
templates Rollup merge of #92864 - Urgau:fix-missing-source-dot, r=jsha 2022-01-14 07:47:39 +01:00
theme Clean up rustdoc static files 2021-07-07 17:52:18 +02:00
Cargo.toml Rollup merge of #92819 - euclio:atty, r=CraftSpider 2022-01-17 06:08:14 +01:00
config.rs Remove configuration which became unused in 8abb4bb698 2022-01-10 18:40:57 +01:00
core.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
docfs.rs rustdoc: Remove a single-use macro 2021-10-28 18:39:32 -07:00
doctest.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
error.rs Simplify rendering of stylesheet links into HTML 2021-11-24 19:41:47 -08:00
externalfiles.rs rustdoc: Fix some unescaped HTML tags in docs 2021-11-19 15:54:05 -05:00
fold.rs rustdoc: Use conditional for _stripped fold 2021-11-04 09:43:13 -07:00
lib.rs Rollup merge of #92819 - euclio:atty, r=CraftSpider 2022-01-17 06:08:14 +01:00
lint.rs Warn when rustdoc:: group is omitted from lint names 2021-07-03 15:32:09 -04:00
markdown.rs Rename TestOptions to GlobalTestOptions 2021-12-12 17:46:19 -08:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
scrape_examples.rs Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
theme.rs fix clippy::single_char_pattern perf findings 2021-12-14 12:40:28 +01:00
visit.rs List all cases explicitly in Doc{Folder,Visitor} 2021-11-01 16:15:46 -07:00
visit_ast.rs rustdoc: avoid many Symbol to String conversions. 2022-01-14 11:57:18 -08:00
visit_lib.rs rustc_metadata: Rename item_children(_untracked) to module_children(_untracked) 2022-01-09 09:22:06 +08:00

For more information about how librustdoc works, see the rustc dev guide.