Commit Graph

3 Commits

Author SHA1 Message Date
Michael Howell
ac303df4e2 rustdoc: move the wbr after the underscore, instead of before 2024-07-29 10:31:02 -07:00
Michael Howell
f3661dce09 rustdoc: word wrap CamelCase in the item list table
This is an alternative to ee6459d652.
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
Michael Howell
5a9a3df312 rustdoc: avoid including <li> tags in item table short desc
Fixes a bug seen at https://docs.rs/gl_constants/0.1.1/gl_constants/index.html
2023-02-23 13:53:27 -07:00