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 "")
|
comment <- try followingcommentp <|> (newline >> return "")
|
||||||
let tags = tagsInComment comment
|
let tags = tagsInComment comment
|
||||||
postings <- postingsp
|
postings <- postingsp
|
||||||
index <- getIndex
|
i' <- (+1) <$> getIndex
|
||||||
setIndex (index+1)
|
setIndex i'
|
||||||
return $ txnTieKnot $ Transaction index sourcepos date edate status code description comment tags postings ""
|
return $ txnTieKnot $ Transaction i' sourcepos date edate status code description comment tags postings ""
|
||||||
|
|
||||||
descriptionp = many (noneOf ";\n")
|
descriptionp = many (noneOf ";\n")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user