Skip to content

Commit c116e98

Browse files
authored
Merge pull request #1288 from pickfire/patch-1
Remove possible whitespace in title
2 parents 918ee5d + b711e10 commit c116e98

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

templates/header/topbar_begin.html

-1
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,3 @@
108108
</ul>
109109
</li>
110110
</ul>
111-

templates/rustdoc/topbar.html

+7-9
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
{%- set crate_url = "/crate/" ~ metadata.name ~ "/" ~ metadata.version -%}
55

66
{%- include "header/topbar_begin.html" -%}{#
7-
7+
extra whitespace unremovable, need to use html tags unaffacted by whitespace T_T
88
#}<ul class="pure-menu-list">
9-
{% if 'krate' in __tera_context %}
9+
{%- if 'krate' in __tera_context -%}
1010
<li class="pure-menu-item pure-menu-has-children">
1111
<a href="#" class="pure-menu-link crate-name" title="{{ krate.description }}">
1212
{{ "cube" | fas }}
@@ -162,16 +162,16 @@
162162
{%- endif -%}
163163
</div>
164164
</li>
165-
{% else %}
165+
{%- else -%}
166166
<li class="pure-menu-item">
167167
<a href="{{ crate_url | safe }}" class="pure-menu-link crate-name" title="{{ metadata.description }}">
168168
{{ "cube" | fas }}
169169
<span class="title">{{ metadata.name }}-{{ metadata.version }}</span>
170170
</a>
171171
</li>
172-
{%- endif -%}
172+
{%- endif -%}{#
173173

174-
{# If this is the latest release and it's been yanked, just display a warning #}
174+
If this is the latest release and it's been yanked, just display a warning #}
175175
{%- if is_latest_version and metadata.yanked -%}
176176
<li class="pure-menu-item">
177177
<span class="pure-menu-link warn">
@@ -204,7 +204,7 @@
204204
{%- endif -%}
205205

206206
{# Display the platforms that the release has been built for #}
207-
{% if metadata.doc_targets %}
207+
{%- if metadata.doc_targets -%}
208208
<li class="pure-menu-item pure-menu-has-children">
209209
<a href="#" class="pure-menu-link" aria-label="Platform">
210210
{{ "cogs" | fas }}
@@ -236,14 +236,12 @@
236236
</ul>
237237
</li>{#
238238
Display the features available in current build
239-
#}
240-
<li class="pure-menu-item">
239+
#}<li class="pure-menu-item">
241240
<a href="{{ crate_url | safe }}/features" title="Browse available feature flags of {{ metadata.name }}-{{ metadata.version }}" class="pure-menu-link">
242241
{{ "flag" | fas }}
243242
<span class="title">Feature flags</span>
244243
</a>
245244
</li>
246245
{% endif %}
247246
</ul>
248-
249247
{%- include "header/topbar_end.html" -%}

0 commit comments

Comments
 (0)