Skip to content

Commit 6b80523

Browse files
mobywmgeisler
andauthored
Add heading attribute to glossary.md (#1829)
Add heading attributes[1] to avoid ID changes in translation. [1]: https://rust-lang.github.io/mdBook/format/markdown.html#heading-attributes Related: #1825 --------- Co-authored-by: Martin Geisler <[email protected]>
1 parent f600b96 commit 6b80523

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/glossary.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
# Glossary
1+
<!-- i18n:comment Please keep { #glossary } untranslated. -->
2+
3+
# Glossary { #glossary }
24

35
The following is a glossary which aims to give a short definition of many Rust
46
terms. For translations, this also serves to connect the term back to the
57
English original.
68

79
<style>
8-
h1 ~ ul {
10+
h1#glossary ~ ul {
911
list-style: none;
1012
padding-inline-start: 0;
1113
}
1214

13-
h1 ~ ul > li {
15+
h1#glossary ~ ul > li {
1416
/* Simplify with "text-indent: 2em hanging" when supported:
1517
https://caniuse.com/mdn-css_properties_text-indent_hanging */
1618
padding-left: 2em;
1719
text-indent: -2em;
1820
}
1921

20-
h1 ~ ul > li:first-line {
22+
h1#glossary ~ ul > li:first-line {
2123
font-weight: bold;
2224
}
2325
</style>

0 commit comments

Comments
 (0)