mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 12:24:43 +03:00
fix comments with numbers on same line as transactions without an amount
This commit is contained in:
parent
6883ff419d
commit
7ff1b758c5
2
Parse.hs
2
Parse.hs
@ -224,7 +224,7 @@ ledgeraccount = many1 (alphaNum <|> char ':' <|> char '/' <|> char '_' <|> try (
|
|||||||
ledgeramount :: Parser Amount
|
ledgeramount :: Parser Amount
|
||||||
ledgeramount = try (do
|
ledgeramount = try (do
|
||||||
many1 spacenonewline
|
many1 spacenonewline
|
||||||
currency <- many (noneOf "-.0123456789\n") <?> "currency"
|
currency <- many (noneOf "-.0123456789;\n") <?> "currency"
|
||||||
quantity <- many1 (oneOf "-.,0123456789") <?> "quantity"
|
quantity <- many1 (oneOf "-.,0123456789") <?> "quantity"
|
||||||
return (Amount (getcurrency currency) (read $ stripcommas quantity))
|
return (Amount (getcurrency currency) (read $ stripcommas quantity))
|
||||||
) <|>
|
) <|>
|
||||||
|
Loading…
Reference in New Issue
Block a user