parsing: require whitespace between date and status code, prevent silent effective date breakage
This commit is contained in:
parent
31ae51b435
commit
e3e935e129
@ -314,6 +314,7 @@ ledgerTransaction :: GenParser Char LedgerFileCtx LedgerTransaction
|
|||||||
ledgerTransaction = do
|
ledgerTransaction = do
|
||||||
date <- ledgerdate <?> "transaction"
|
date <- ledgerdate <?> "transaction"
|
||||||
edate <- ledgereffectivedate
|
edate <- ledgereffectivedate
|
||||||
|
many1 spacenonewline
|
||||||
status <- ledgerstatus
|
status <- ledgerstatus
|
||||||
code <- ledgercode
|
code <- ledgercode
|
||||||
description <- liftM rstrip (many1 (noneOf ";\n") <?> "description")
|
description <- liftM rstrip (many1 (noneOf ";\n") <?> "description")
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# extra slash before [ silently breaks effective date (0.6.1)
|
# an extra slash before [ silently disables the effective date in 0.6.1
|
||||||
-f - print --effective -p 2009/1/2
|
-f - print --effective -p 2009/1/2
|
||||||
<<<
|
<<<
|
||||||
2009/1/1/[=2009/1/2] x
|
2009/1/1/[=2009/1/2] x
|
||||||
@ -6,3 +6,4 @@
|
|||||||
b
|
b
|
||||||
|
|
||||||
>>>2 /unexpected/
|
>>>2 /unexpected/
|
||||||
|
>>>= 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user