;journal: in generated-transaction:/posting: tags, add a space before the value
This commit is contained in:
parent
40c089dcfc
commit
6dcddadd9f
@ -372,6 +372,7 @@ commentJoin c1 c2
|
|||||||
| otherwise = c1 <> ", " <> c2
|
| otherwise = c1 <> ", " <> c2
|
||||||
|
|
||||||
-- | Add a tag to a comment, comma-separated from any prior content.
|
-- | Add a tag to a comment, comma-separated from any prior content.
|
||||||
|
-- A space is inserted following the colon, before the value.
|
||||||
commentAddTag :: Text -> Tag -> Text
|
commentAddTag :: Text -> Tag -> Text
|
||||||
commentAddTag c (t,v)
|
commentAddTag c (t,v)
|
||||||
| T.null c' = tag
|
| T.null c' = tag
|
||||||
@ -381,6 +382,7 @@ commentAddTag c (t,v)
|
|||||||
tag = t <> ": " <> v
|
tag = t <> ": " <> v
|
||||||
|
|
||||||
-- | Add a tag on its own line to a comment, preserving any prior content.
|
-- | Add a tag on its own line to a comment, preserving any prior content.
|
||||||
|
-- A space is inserted following the colon, before the value.
|
||||||
commentAddTagNextLine :: Text -> Tag -> Text
|
commentAddTagNextLine :: Text -> Tag -> Text
|
||||||
commentAddTagNextLine cmt (t,v) =
|
commentAddTagNextLine cmt (t,v) =
|
||||||
cmt <> if "\n" `T.isSuffixOf` cmt then "" else "\n" <> t <> ": " <> v
|
cmt <> if "\n" `T.isSuffixOf` cmt then "" else "\n" <> t <> ": " <> v
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user