diff options
Diffstat (limited to 'app/Issue.hs')
-rw-r--r-- | app/Issue.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/Issue.hs b/app/Issue.hs index 249ce92..07bddee 100644 --- a/app/Issue.hs +++ b/app/Issue.hs @@ -20,24 +20,27 @@ data Issue = Issue description :: Maybe Text, start :: G.Position, end :: G.Position, - tags :: [Tag] + tags :: [Tag], + internalTags :: [Tag] } fromMatch :: G.Result -> G.Match -> Maybe Issue fromMatch result match = - if T.isPrefixOf marker title + if T.isPrefixOf marker title' then Just Issue - { title = stripMarker title, + { title = title, description = stripTags <$> description, start = match.start, end = match.end, - tags = maybe [] I.extract description + tags = maybe [] I.extractTags description, + internalTags = I.internalTags title } else Nothing where - (title, description) = I.extractText result.file_type match.text + (title', description) = I.extractText result.file_type match.text + title = stripMarker title' marker :: Text marker = "TODO" |