From 6b805230c72d29c3120ff7a059a0c773440e1d74 Mon Sep 17 00:00:00 2001 From: mobyw <44370805+mobyw@users.noreply.github.com> Date: Tue, 20 Feb 2024 18:00:59 +0800 Subject: [PATCH] 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> --- src/glossary.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/glossary.md b/src/glossary.md index dcb8a3db..b8bc5466 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -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 terms. For translations, this also serves to connect the term back to the English original. <style> -h1 ~ ul { +h1#glossary ~ ul { list-style: none; padding-inline-start: 0; } -h1 ~ ul > li { +h1#glossary ~ ul > li { /* Simplify with "text-indent: 2em hanging" when supported: https://caniuse.com/mdn-css_properties_text-indent_hanging */ padding-left: 2em; text-indent: -2em; } -h1 ~ ul > li:first-line { +h1#glossary ~ ul > li:first-line { font-weight: bold; } </style>