Commit 542522ec authored by Stian Håklev's avatar Stian Håklev

Stripping before processing, not after

parent 98bff009
......@@ -230,9 +230,10 @@ data EvalOut = EvalOut {
}
cleanString :: String -> String
cleanString x = strip $ if allBrackets then clean else x
cleanString x = if allBrackets then clean else str
where
l = lines x
str = strip x
l = lines str
allBrackets = all (fAny [isPrefixOf ">", null]) l
fAny fs x = any ($x) fs
clean = unlines $ map removeBracket l
......
Markdown is supported
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