Skip to content

Commit

Permalink
📖 Improve the documentation around abbreviations (#1729)
Browse files Browse the repository at this point in the history
Fixes #1703
  • Loading branch information
rowanc1 authored Jan 6, 2025
1 parent 3950dca commit 7d916fe
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/glossaries-and-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,18 @@ The abbreviations are case-sensitive and will replace all instances[^1] in your
>
> - TLA Soup
:::{tip} Order of Abbreviations
:class: dropdown
### Order of Abbreviations

Abbreviations defined in your frontmatter are applied in longest-sorted order. If you have two abbreviations with the same suffix (e.g. `RHR` and `HR`), the longer abbreviation will always take precedence.
To have the longer abbreviations not be transformed, explicitly set them to `null` in your frontmatter (e.g. `RHR: null`).
:::
To have longer abbreviations **not** be transformed, or if that string is included in another word, explicitly set them to `null` in your frontmatter. In the following example, `HTML` will not have the letters `ML` as an abbreviation.

```{myst}
---
abbreviations:
ML: Machine Learning
HTML: null
---
We use ML to parse HTML.
```

0 comments on commit 7d916fe

Please sign in to comment.