diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-09-10 08:23:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-10 08:23:24 -0700 |
| commit | 130e2e1edf211debb8ac9196fb4e525a87bb2607 (patch) | |
| tree | 25239ed776f35a0be09bc9752ad9302cadb91a36 /src/librustdoc/html/render | |
| parent | 1c091e4f630b6e8da44f491180b2196cf7a4fc01 (diff) | |
| parent | 021b8ff8bd3d351f098847c3507ffb2c6c722aa3 (diff) | |
| download | rust-130e2e1edf211debb8ac9196fb4e525a87bb2607.tar.gz rust-130e2e1edf211debb8ac9196fb4e525a87bb2607.zip | |
Rollup merge of #88742 - GuillaumeGomez:fix-table-in-docblocks, r=nbdd0121
Fix table in docblocks "Overwrite" of #88702. Instead of adding a z-index to the sidebar (which only hides the issue, doesn't fix it), I wrap `<table>` elements inside a `<div>` and limit all chidren of `.docblock` elements' width to prevent having the scrollbar on the whole doc block.  Thanks `@nbdd0121` for `overflow-x: auto;`. ;) r? `@notriddle`
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index c6620a43abd..8917c1e25c2 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -275,7 +275,8 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl write!( w, "<h2 id=\"{id}\" class=\"section-header\">\ - <a href=\"#{id}\">{name}</a></h2>\n{}", + <a href=\"#{id}\">{name}</a>\ + </h2>\n{}", ITEM_TABLE_OPEN, id = cx.derive_id(short.to_owned()), name = name |
