parsing: require whitespace between date and status code, prevent silent effective date breakage

This commit is contained in:
Simon Michael 2009-11-25 20:12:09 +00:00
parent 31ae51b435
commit e3e935e129
2 changed files with 3 additions and 1 deletions

View File

@ -314,6 +314,7 @@ ledgerTransaction :: GenParser Char LedgerFileCtx LedgerTransaction
ledgerTransaction = do
date <- ledgerdate <?> "transaction"
edate <- ledgereffectivedate
many1 spacenonewline
status <- ledgerstatus
code <- ledgercode
description <- liftM rstrip (many1 (noneOf ";\n") <?> "description")

View File

@ -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
<<<
2009/1/1/[=2009/1/2] x
@ -6,3 +6,4 @@
b
>>>2 /unexpected/
>>>= 1