aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Issue.hs6
-rw-r--r--app/Main.hs8
2 files changed, 12 insertions, 2 deletions
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)
diff --git a/app/Main.hs b/app/Main.hs
index 151115e..44b4242 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -134,7 +134,13 @@ showMatches issues = do
[ [P.annotate P.bold (P.pretty issue.title)],
if not (T.null issue.description)
then [P.pretty issue.description]
- else []
+ else [],
+ map
+ ( \(I.Tag k v) ->
+ P.annotate (P.colorDull P.Yellow) $
+ P.pretty ("@" `T.append` k `T.append` " " `T.append` v)
+ )
+ issue.tags
]
)
)