mirror of
https://github.com/github/semantic.git
synced 2024-12-18 12:21:57 +03:00
actualLines ends lines with their newlines.
This commit is contained in:
parent
0c9308b6ae
commit
7abe07bd16
@ -234,8 +234,6 @@ classify = foldr (const . Just . ("category-" ++)) Nothing
|
||||
actualLines :: String -> [String]
|
||||
actualLines "" = [""]
|
||||
actualLines lines = case break (== '\n') lines of
|
||||
(l, lines') -> l : (case lines' of
|
||||
[] -> []
|
||||
_:lines' -> (case actualLines lines' of
|
||||
[] -> ["\n"]
|
||||
s:rest -> ('\n' : s) : rest))
|
||||
(l, lines') -> (case lines' of
|
||||
[] -> [ l ]
|
||||
_:lines' -> (l ++ "\n") : actualLines lines')
|
||||
|
Loading…
Reference in New Issue
Block a user