Rollup merge of #105912 - notriddle:notriddle/pre-line-height, r=GuillaumeGomez
rustdoc: force pre tags to have the default line height Fixes #105906
This commit is contained in:
commit
951949c05e
@ -338,6 +338,7 @@ code, pre, a.test-arrow, .code-header {
|
||||
}
|
||||
pre {
|
||||
padding: 14px;
|
||||
line-height: 1.5; /* https://github.com/rust-lang/rust/issues/105906 */
|
||||
}
|
||||
.item-decl pre {
|
||||
overflow-x: auto;
|
||||
|
5
src/test/rustdoc-gui/codeblock-sub.goml
Normal file
5
src/test/rustdoc-gui/codeblock-sub.goml
Normal file
@ -0,0 +1,5 @@
|
||||
// Test that code blocks nested within <sub> do not have a line height of 0.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/codeblock_sub/index.html"
|
||||
|
||||
store-property: (codeblock_sub_1, "#codeblock-sub-1", "offsetHeight")
|
||||
assert-property-false: ("#codeblock-sub-3", { "offsetHeight": |codeblock_sub_1| })
|
@ -455,3 +455,22 @@ impl TypeWithImplDoc {
|
||||
/// fn doc
|
||||
pub fn test_fn() {}
|
||||
}
|
||||
|
||||
/// <sub id="codeblock-sub-1">
|
||||
///
|
||||
/// ```
|
||||
/// one
|
||||
/// ```
|
||||
///
|
||||
/// </sub>
|
||||
///
|
||||
/// <sub id="codeblock-sub-3">
|
||||
///
|
||||
/// ```
|
||||
/// one
|
||||
/// two
|
||||
/// three
|
||||
/// ```
|
||||
///
|
||||
/// </sub>
|
||||
pub mod codeblock_sub {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user