1
Fork 0
rust/src/librustdoc/html
Michael Howell f3661dce09 rustdoc: word wrap CamelCase in the item list table
This is an alternative to ee6459d6521cf6a4c2e08b6e13ce3c6ce5d55ed0.
That is, it fixes the issue that affects the very long type names
in https://docs.rs/async-stripe/0.31.0/stripe/index.html#structs.

This is, necessarily, a pile of nasty heuristics.
We need to balance a few issues:

- Sometimes, there's no real word break.
  For example, `BTreeMap` should be `BTree<wbr>Map`,
  not `B<wbr>Tree<wbr>Map`.

- Sometimes, there's a legit word break,
  but the name is tiny and the HTML overhead isn't worth it.
  For example, if we're typesetting `TyCtx`,
  writing `Ty<wbr>Ctx` would have an HTML overhead of 50%.
  Line breaking inside it makes no sense.
2024-07-29 08:45:50 -07:00
..
escape rustdoc: word wrap CamelCase in the item list table 2024-07-29 08:45:50 -07:00
highlight Reformat use declarations. 2024-07-29 08:26:52 +10:00
length_limit Remove from librustdoc and clippy too 2023-01-27 20:44:19 -08:00
markdown Reformat use declarations. 2024-07-29 08:26:52 +10:00
render rustdoc: word wrap CamelCase in the item list table 2024-07-29 08:45:50 -07:00
static Rollup merge of #125779 - GuillaumeGomez:copy-code, r=rustdoc-team 2024-07-28 20:07:44 +02:00
templates Replace askama with rinja 2024-07-23 11:19:55 +02:00
toc Format the world 2019-12-22 17:42:47 -05:00
url_parts_builder Document and test UrlPartsBuilder::push_fmt 2022-01-14 12:05:35 -08:00
escape.rs rustdoc: word wrap CamelCase in the item list table 2024-07-29 08:45:50 -07:00
format.rs rustdoc: word wrap CamelCase in the item list table 2024-07-29 08:45:50 -07:00
highlight.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
layout.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
length_limit.rs Improve code readability by moving fmt args directly into the string 2023-08-16 16:35:23 +02:00
markdown.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
mod.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
static_files.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
toc.rs fix clippy perf lints 2022-05-24 13:35:54 -04:00
url_parts_builder.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00