Fix Darcs patch author parsing

This commit is contained in:
fr33domlover 2018-07-10 15:26:16 +00:00
parent a50de1fe88
commit edaf141359

View file

@ -302,8 +302,8 @@ readPatch path hash = do
Right mi -> loop pih (miPatches mi) (Just $ miPrevious mi) Right mi -> loop pih (miPatches mi) (Just $ miPrevious mi)
email = maybe (fail "invalid email") pure . emailAddress . encodeUtf8 email = maybe (fail "invalid email") pure . emailAddress . encodeUtf8
author = (,) author = (,)
<$> A.takeWhile1 (const True) <$> (T.stripEnd <$> A.takeWhile1 (/= '<'))
<* " <" <* A.skip (== '<')
<*> (A.takeWhile1 (/= '>') >>= email) <*> (A.takeWhile1 (/= '>') >>= email)
<* A.skip (== '>') <* A.skip (== '>')
mkedit (file, hunks) = mkedit (file, hunks) =