From 2b93e0bce102d7ccf8402b4506be9e55698f2ea9 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 4 Oct 2023 15:48:26 +0200 Subject: strip tags from description --- app/Issue.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Issue.hs') diff --git a/app/Issue.hs b/app/Issue.hs index 72fbad3..0d9f6ad 100644 --- a/app/Issue.hs +++ b/app/Issue.hs @@ -32,7 +32,7 @@ fromMatch result match = Just Issue { title = stripMarker (T.strip (T.unlines title)), - description = T.strip (T.unlines description), + description = stripTags (T.strip (T.unlines description)), start = match.start, end = match.end, tags = I.extract text @@ -48,6 +48,10 @@ fromMatch result match = marker :: Text marker = "TODO" +stripTags :: Text -> Text +stripTags text = + T.strip (T.unlines (filter (not . T.isPrefixOf "@") (T.lines text))) + stripMarker :: Text -> Text stripMarker text = maybe text T.stripStart (T.stripPrefix marker text) -- cgit v1.2.3