mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
lib: minor cleanup in 'periodictransactionp'
This commit is contained in:
parent
519297051d
commit
83a63a4ef5
@ -533,17 +533,14 @@ periodictransactionp = do
|
||||
Nothing -> pure ()
|
||||
-- The line can end here, or it can continue with one or more spaces
|
||||
-- and then zero or more of the following fields. A bit awkward.
|
||||
(status, code, description, (comment, tags)) <-
|
||||
(lift eolof >> return (Unmarked, "", "", ("", [])))
|
||||
<|>
|
||||
(do
|
||||
lift $ skipSome spacenonewline
|
||||
s <- lift statusp
|
||||
c <- lift codep
|
||||
desc <- lift $ T.strip <$> descriptionp
|
||||
(cmt, ts) <- lift transactioncommentp
|
||||
(status, code, description, (comment, tags)) <- lift $
|
||||
(<|>) (eolof >> return (Unmarked, "", "", ("", []))) $ do
|
||||
skipSome spacenonewline
|
||||
s <- statusp
|
||||
c <- codep
|
||||
desc <- T.strip <$> descriptionp
|
||||
(cmt, ts) <- transactioncommentp
|
||||
return (s,c,desc,(cmt,ts))
|
||||
)
|
||||
|
||||
-- next lines; use same year determined above
|
||||
postings <- postingsp (Just $ first3 $ toGregorian refdate)
|
||||
|
Loading…
Reference in New Issue
Block a user