mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Remove a redundant case.
This gets picked up adequately by the next one.
This commit is contained in:
parent
06a826c5f0
commit
eb9f36870d
@ -18,7 +18,6 @@ rangesOfWordsFrom :: Int -> String -> [Range]
|
|||||||
rangesOfWordsFrom startIndex string = case break (not . isWord) string of
|
rangesOfWordsFrom startIndex string = case break (not . isWord) string of
|
||||||
([], []) -> []
|
([], []) -> []
|
||||||
([], rest) -> rangesOfWordsAfterWhitespace startIndex rest
|
([], rest) -> rangesOfWordsAfterWhitespace startIndex rest
|
||||||
(word, []) -> [ Range startIndex $ startIndex + length word ]
|
|
||||||
(word, rest) -> (Range startIndex $ startIndex + length word) : rangesOfWordsAfterWhitespace (startIndex + length word) rest
|
(word, rest) -> (Range startIndex $ startIndex + length word) : rangesOfWordsAfterWhitespace (startIndex + length word) rest
|
||||||
where
|
where
|
||||||
rangesOfWordsAfterWhitespace startIndex string | (whitespace, rest) <- break isWord string = rangesOfWordsFrom (startIndex + length whitespace) rest
|
rangesOfWordsAfterWhitespace startIndex string | (whitespace, rest) <- break isWord string = rangesOfWordsFrom (startIndex + length whitespace) rest
|
||||||
|
Loading…
Reference in New Issue
Block a user