about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-17 20:07:05 +0100
committerGitHub <noreply@github.com>2022-01-17 20:07:05 +0100
commit51aa20de075561ee397b8b76bf181730ca7ff30c (patch)
tree64e55547edd666c13ced980443c16f068757cf29 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent4de63e7c23320f49114da8b39f675d995b480750 (diff)
parent4d5a6c90b1df5590c1c1801baf51903520af012c (diff)
downloadrust-51aa20de075561ee397b8b76bf181730ca7ff30c.tar.gz
rust-51aa20de075561ee397b8b76bf181730ca7ff30c.zip
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``
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions