diff --git a/src/Range.hs b/src/Range.hs index 3e87d90d2..54ba963d1 100644 --- a/src/Range.hs +++ b/src/Range.hs @@ -18,7 +18,7 @@ offsetRange i (Range start end) = Range (i + start) (i + end) rangesAndWordsFrom :: Int -> String -> [(Range, String)] rangesAndWordsFrom _ "" = [] rangesAndWordsFrom startIndex string = - case takeAndContinue <$> (parse isWord string <|> parse (not . isWordOrSpace) string) of + case takeAndContinue <$> (word <|> punctuation) of Just a -> a Nothing -> case parse Char.isSpace string of