Commit 98bff009 authored by Stian Håklev's avatar Stian Håklev

Fixing cleanString

parent ae2a6f14
......@@ -233,11 +233,13 @@ cleanString :: String -> String
cleanString x = strip $ if allBrackets then clean else x
where
l = lines x
allBrackets = all (fAny [isInfixOf ">", null]) l
allBrackets = all (fAny [isPrefixOf ">", null]) l
fAny fs x = any ($x) fs
clean = unlines $ map removeBracket l
removeBracket (x:xs) = xs
removeBracket [] = []
-- should never happen:
removeBracket other = error $ "Expected bracket as first char, but got string: " ++ other
-- | Evaluate some IPython input code.
evaluate :: KernelState -- ^ The kernel state.
......
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