Commit 2a454153 authored by Nicolas Lenz's avatar Nicolas Lenz
Browse files

Trim end whitespace from input

parent 10610588
......@@ -19,7 +19,7 @@ main = do
-- |Returns an IO action handling the given list of arguments.
handle :: [String] -> IO ()
handle (style:text) = transform (intercalate " " text) >>= putStrLn where
handle (style:text) = transform (dropWhileEnd isSpace (intercalate " " text)) >>= putStrLn where
transform :: String -> IO String
transform = case lookup style styles of -- Lookup style name in styles list
Just f -> f -- Use the found style function
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment