From c2e4b0a28c050c52f6ed84d6ae1e7172e4b6b08a Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 29 Nov 2023 05:39:32 +0100 Subject: support comments --- app/History/PartialCommitInfo.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/History/PartialCommitInfo.hs') diff --git a/app/History/PartialCommitInfo.hs b/app/History/PartialCommitInfo.hs index 7497f38..f973938 100644 --- a/app/History/PartialCommitInfo.hs +++ b/app/History/PartialCommitInfo.hs @@ -4,6 +4,7 @@ module History.PartialCommitInfo ) where +import Control.Arrow (second) import Control.Exception (catch, handle) import Data.Binary (Binary) import Data.ByteString.Lazy.Char8 qualified as LB8 @@ -100,14 +101,16 @@ fromComment cwd comment = do tags = maybe [] I.extractTags description, markers = markers, rawText = rawText, - commentStyle = commentStyle + commentStyle = commentStyle, + comments = comments } else Nothing ) where (commentStyle, rawText) = G.uncomment comment.file_type comment.text - (title', description) = I.extractText rawText + (title', description') = I.extractText rawText (markers, title) = I.stripIssueMarkers title' + (comments, description) = maybe ([], Nothing) (second Just . I.extractComments) description' dieOfInvalidTreeGrepperResult :: E.InvalidTreeGrepperResult -> IO a dieOfInvalidTreeGrepperResult (E.InvalidTreeGrepperResult e) = -- cgit v1.2.3