about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-10-06 11:30:48 -0700
committerMichael Howell <michael@notriddle.com>2023-10-22 15:56:15 -0700
commitfd9ab34785f2991f71896940cbb5c547da9d08b2 (patch)
tree5c44a75ea6fa41bd46dab4ab0324ded6845db7e8
parentd8afa673ccbcdd4f8f947e4f7eda8d1839bed277 (diff)
downloadrust-fd9ab34785f2991f71896940cbb5c547da9d08b2.tar.gz
rust-fd9ab34785f2991f71896940cbb5c547da9d08b2.zip
rustdoc: clean up sidebar.html block class
This line is longer than 100 characters, but apparently,
[tidy's list of checked extensions] doesn't include html,
so the line length doesn't matter.

[tidy's list of checked extensions]: https://github.com/rust-lang/rust/blob/31be8cc41148983e742fea8f559aacca0f6647db/src/tools/tidy/src/style.rs#L245
-rw-r--r--src/librustdoc/html/templates/sidebar.html6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustdoc/html/templates/sidebar.html b/src/librustdoc/html/templates/sidebar.html
index 4318d680276..d982134181c 100644
--- a/src/librustdoc/html/templates/sidebar.html
+++ b/src/librustdoc/html/templates/sidebar.html
@@ -18,11 +18,7 @@
                         <h3><a href="#{{block.heading.href|safe}}">{{block.heading.name}}</a></h3>
                     {% endif %}
                     {% if !block.links.is_empty() %}
-                        <ul {%+ if block.class.is_empty() %}
-                                class="block"
-                            {% else %}
-                                class="block {{+ block.class}}"
-                            {% endif %}>
+                        <ul class="block{% if !block.class.is_empty() +%} {{+block.class}}{% endif %}">
                             {% for link in block.links %}
                                 <li><a href="#{{link.href|safe}}">{{link.name}}</a></li>
                             {% endfor %}