lib: fix off-by-one in transaction index
This commit is contained in:
parent
722e19098f
commit
0ee2ff7ab2
@ -443,9 +443,9 @@ transactionp = do
|
||||
comment <- try followingcommentp <|> (newline >> return "")
|
||||
let tags = tagsInComment comment
|
||||
postings <- postingsp
|
||||
index <- getIndex
|
||||
setIndex (index+1)
|
||||
return $ txnTieKnot $ Transaction index sourcepos date edate status code description comment tags postings ""
|
||||
i' <- (+1) <$> getIndex
|
||||
setIndex i'
|
||||
return $ txnTieKnot $ Transaction i' sourcepos date edate status code description comment tags postings ""
|
||||
|
||||
descriptionp = many (noneOf ";\n")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user