From 5bc5bb5533803c74045f79538b2cf32d9d38c293 Mon Sep 17 00:00:00 2001 From: Stephen Morgan Date: Fri, 11 May 2018 17:10:04 +1000 Subject: [PATCH] Fix doctest error introduced by 49c8c093acf8fd212f1e78561969792238f00fae. --- hledger-lib/Hledger/Read/Common.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index b30e7072d..72137d22b 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -731,17 +731,17 @@ fromRawNumber suggestedStyle negated raw = (quantity, precision, mdecimalpoint, -- Numbers may optionally have a period/comma decimal point -- and/or comma/period/space digit group separators, but we don't -- decide which is which here, just return the parts: --- +-- -- - the first separator char (period or comma or space) seen, if any --- +-- -- - the digit group(s), possibly several separated by the above char, occuring before.. --- +-- -- - the second and last separator char, and following digit group, if any. --- --- >>> 1,234,567.89 --- ( Just ',', ["1","234","567"], Just ('.', "89") ) --- >>> 1 000 --- ( Just ' ', ["1","000"], Nothing ) +-- +-- >>> parseTest rawnumberp "1,234,567.89" +-- (Just ',',["1","234","567"],Just ('.',"89")) +-- >>> parseTest rawnumberp "1 000" +-- (Just ' ',["1","000"],Nothing) rawnumberp :: TextParser m ( Maybe Char , [String] , Maybe (Char, String) ) rawnumberp = do let sepChars = ['.', ','] -- all allowed punctuation characters