From 791c25b37b77c3810e3391f38175222d8441ea6b Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 4 Nov 2021 15:58:16 +0100 Subject: [PATCH] Filter whitespaces from bech32 stdin --- bech32/app/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bech32/app/Main.hs b/bech32/app/Main.hs index fc74009..285940d 100644 --- a/bech32/app/Main.hs +++ b/bech32/app/Main.hs @@ -144,7 +144,7 @@ run :: Cmd -> IO () run cmd = case cmd of VersionCmd -> putStrLn $ showVersion version RunCmd {prefix} -> do - source <- T.decodeUtf8 . B8.filter (/= '\n') <$> B8.hGetContents stdin + source <- T.strip . T.decodeUtf8 <$> B8.hGetContents stdin case prefix of Nothing -> runDecode source Just hrp -> runEncode hrp source