mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Capitalization not preserved when using `term` role

Open mfisher87 opened this issue 1 month ago • 1 comments

Description

If I have a glossary entry:

:::{glossary}
Salad
: A food that's only worth eating with peanut sauce 🥜
:::

And I reference it with

I only enjoy {term}`salad` sometimes.

It renders as:

I only enjoy Salad sometimes.

The link goes to the correct glossary entry, but the capitalization is not what I asked for in my term reference. The capitalization used in the term definition is used instead.

Proposed solution

Continue matching terms in the glossary case-insensitively, but preserve the capitalization the author used in the {term} role when rendering the link. Should look like:

I only enjoy salad sometimes.

mfisher87 avatar Oct 10 '25 18:10 mfisher87