Allow comments for periodic transactions.

This commit is contained in:
Stephen Morgan 2018-05-15 10:50:35 +10:00 committed by Simon Michael
parent e1230d9929
commit 6c2385331c

View File

@ -457,11 +457,13 @@ modifiertransactionp = do
postings <- postingsp Nothing
return $ ModifierTransaction valueexpr postings
-- | Parse a periodic transaction
periodictransactionp :: MonadIO m => ErroringJournalParser m PeriodicTransaction
periodictransactionp = do
char '~' <?> "periodic transaction"
lift (skipMany spacenonewline)
periodexpr <- T.pack <$> lift restofline
periodexpr <- T.pack . strip <$> descriptionp
_ <- try followingcommentp <|> (newline >> return "")
postings <- postingsp Nothing
return $ PeriodicTransaction periodexpr postings