diff options
-rw-r--r-- | app/Main.hs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs index 74739b8..abc8d4c 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -25,7 +25,7 @@ -- -- Only the first TODO/FIXME inside a comment block should be considered -- as the start of an issue. --- + -- TODO Add support for other keywords -- -- Additionally to TODO, also FIXME should start an issue. There might @@ -222,9 +222,15 @@ fixTreeGrepper treeGrepperResult = mergeMatches matches = Maybe.catMaybes [ subs ms - | ms <- L.groupBy eq matches + | ms <- groupBy eq matches ] - eq m n = m.end.row + 1 <= n.start.row + groupBy p xs = reverse (map reverse (groupBy' [] p xs)) + groupBy' as p [] = as + groupBy' [] p (x : xs) = groupBy' [[x]] p xs + groupBy' (ass@((a : as) : rs)) p (x : xs) + | p a x = groupBy' ((x : a : as) : rs) p xs + | otherwise = groupBy' ([x] : ass) p xs + eq m n = m.end.row + 1 == n.start.row subs [] = Nothing subs (mss@(m : _)) = Just |