Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: word wrap CamelCase in the item list table and sidebar #126247

Merged
merged 7 commits into from
Jul 30, 2024

Commits on Jul 29, 2024

  1. rustdoc: word wrap CamelCase in the item list table

    This is an alternative to ee6459d.
    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.
    notriddle committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    f3661dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    583bf1e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d0e18e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9186001 View commit details
    Browse the repository at this point in the history
  5. rustdoc: use <wbr> in sidebar headers

    This also improves sidebar layout, so instead of
    
        BTreeM
        ap
    
    you get this
    
        BTree
        Map
    notriddle committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    1d339b0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3bf8bcf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ac303df View commit details
    Browse the repository at this point in the history