don't mark a multidigit number as an abbr

This commit is contained in:
Rhiannon Morris 2024-11-28 00:19:10 +01:00
parent b36e72adf5
commit 0e03d360a7

View file

@ -91,6 +91,6 @@ abbrs (Str txt) = go $ endash txt where
= abbr' l : go r
| (l, r) <- Text.break isAbbr txt
= Str l : go r
abbr' txt = if Text.length txt == 1 then Str txt else abbr txt
abbr' txt = if Text.any (not . isDigit) txt then abbr txt else Str txt
isAbbr c = isUpper c || isDigit c || c `elem` (",.;\\[]" :: String)
abbrs i = [i]