From edaf141359a95d5ed01742ca83de5a53c50cb8ef Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Tue, 10 Jul 2018 15:26:16 +0000 Subject: [PATCH] Fix Darcs patch author parsing --- src/Vervis/Darcs.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Vervis/Darcs.hs b/src/Vervis/Darcs.hs index 17e5a50..9d1fc45 100644 --- a/src/Vervis/Darcs.hs +++ b/src/Vervis/Darcs.hs @@ -302,8 +302,8 @@ readPatch path hash = do Right mi -> loop pih (miPatches mi) (Just $ miPrevious mi) email = maybe (fail "invalid email") pure . emailAddress . encodeUtf8 author = (,) - <$> A.takeWhile1 (const True) - <* " <" + <$> (T.stripEnd <$> A.takeWhile1 (/= '<')) + <* A.skip (== '<') <*> (A.takeWhile1 (/= '>') >>= email) <* A.skip (== '>') mkedit (file, hunks) =