diff --git a/langfilter/Spans.hs b/langfilter/Spans.hs index 618ed0f..2ccade9 100644 --- a/langfilter/Spans.hs +++ b/langfilter/Spans.hs @@ -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]