From 7d916fe824779ccb91ea68933830f07248bf89ea Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Mon, 6 Jan 2025 14:45:56 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20Improve=20the=20documentation=20?= =?UTF-8?q?around=20abbreviations=20(#1729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1703 --- docs/glossaries-and-terms.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/glossaries-and-terms.md b/docs/glossaries-and-terms.md index 53c503a57..0afd315dc 100644 --- a/docs/glossaries-and-terms.md +++ b/docs/glossaries-and-terms.md @@ -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. +```