parsing: don't let trailing whitespace in a timelog description mess up layout

This commit is contained in:
Simon Michael 2010-07-08 03:08:28 +00:00
parent 816083d82f
commit 3e9ad0ae13

View File

@ -93,7 +93,7 @@ timelogentry = do
many1 spacenonewline
datetime <- ledgerdatetime
comment <- optionMaybe (many1 spacenonewline >> liftM2 (++) getParentAccount restofline)
return $ TimeLogEntry (read [code]) datetime (fromMaybe "" comment)
return $ TimeLogEntry (read [code]) datetime (maybe "" rstrip comment)
tests_Timelog = TestList [
]