1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-21 14:46:37 +02:00

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 <martin@geisler.net>
This commit is contained in:
mobyw 2024-02-20 18:00:59 +08:00 committed by GitHub
parent f600b9629b
commit 6b805230c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,23 +1,25 @@
# Glossary <!-- i18n:comment Please keep { #glossary } untranslated. -->
# Glossary { #glossary }
The following is a glossary which aims to give a short definition of many Rust The following is a glossary which aims to give a short definition of many Rust
terms. For translations, this also serves to connect the term back to the terms. For translations, this also serves to connect the term back to the
English original. English original.
<style> <style>
h1 ~ ul { h1#glossary ~ ul {
list-style: none; list-style: none;
padding-inline-start: 0; padding-inline-start: 0;
} }
h1 ~ ul > li { h1#glossary ~ ul > li {
/* Simplify with "text-indent: 2em hanging" when supported: /* Simplify with "text-indent: 2em hanging" when supported:
https://caniuse.com/mdn-css_properties_text-indent_hanging */ https://caniuse.com/mdn-css_properties_text-indent_hanging */
padding-left: 2em; padding-left: 2em;
text-indent: -2em; text-indent: -2em;
} }
h1 ~ ul > li:first-line { h1#glossary ~ ul > li:first-line {
font-weight: bold; font-weight: bold;
} }
</style> </style>