Using the bibliography with a numbered style such as ‘Nature’ will generate citation ranges in the form of two numbers and an en-dash that will look e.g. like
some example text1–3
Unfortunately, this can lead to line breaks after the en-dash and before the second number which I would like to avoid.
I already tried sth like this
#show regex("\\d+\u2013\\d+"): it => box(it)
to prevent the line break at the en-dash.
However this doesn’t work either because there are additional non-visible characters/symbols or the text gets generated at a different stage?
The numbers and the en dash come from different parts (text/delimiter/…) in the CSL (the citation style), and it looks like that typst does not allow a show rule to match across those parts…
Perhaps typst should provide a cite.group element to make show cite.group: box possible.
(The underlying rust code already implemented the struct CiteGroup.)