summaryrefslogtreecommitdiffhomepage
path: root/src/Parsers.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-08-21 19:09:15 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-08-21 19:09:15 +0200
commit8afb450eb104e5335f4b1b976512842f7059142c (patch)
tree949e3ec6aba45ebf366c2d31c5edc0177995c195 /src/Parsers.hs
parent5d5b4a4d7e07d20eec62b5650df5d55807741a4c (diff)
downloadxmobar-8afb450eb104e5335f4b1b976512842f7059142c.tar.gz
xmobar-8afb450eb104e5335f4b1b976512842f7059142c.tar.bz2
Show invalid input in case of parsing error in template
As a side-effect, parts without substitution vars will be displayed as-is, fixing a bug reported by RC in the mailing list.
Diffstat (limited to 'src/Parsers.hs')
-rw-r--r--src/Parsers.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Parsers.hs b/src/Parsers.hs
index 1450a0e..baaa287 100644
--- a/src/Parsers.hs
+++ b/src/Parsers.hs
@@ -87,7 +87,7 @@ templateParser = many . templateStringParser
parseTemplate :: Config -> String -> IO [(Runnable,String,String)]
parseTemplate c s =
do str <- case parse (templateParser c) "" s of
- Left _ -> return [("","","")]
+ Left _ -> return [("", s, "")]
Right x -> return x
let cl = map alias (commands c)
m = Map.fromList $ zip cl (commands c)