diff options
author | jao <jao@gnu.org> | 2011-08-29 17:56:35 -0700 |
---|---|---|
committer | jao <jao@gnu.org> | 2011-08-29 17:56:35 -0700 |
commit | a49eb5f2432631fbf691b1e4abb7100bda8078f4 (patch) | |
tree | 964c3768609be66ce6dae43e72409d7c19c8e15d /src | |
parent | d17958115fbb80d5baf58830f33390cd21acedac (diff) | |
parent | 9f3d337e753826da3f48cc45b664f4a919a67058 (diff) | |
download | xmobar-a49eb5f2432631fbf691b1e4abb7100bda8078f4.tar.gz xmobar-a49eb5f2432631fbf691b1e4abb7100bda8078f4.tar.bz2 |
Merge pull request #24 from skinner33/parserFix
Fix the detection of the end of the command array
Diffstat (limited to 'src')
-rw-r--r-- | src/Parsers.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Parsers.hs b/src/Parsers.hs index baaa287..f5f00a9 100644 --- a/src/Parsers.hs +++ b/src/Parsers.hs @@ -159,7 +159,8 @@ parseConfig = runParser parseConf fields "Config" . stripComments return ("Static {" ++ p ++ "}") tillFieldEnd = staticPos <|> many (noneOf ",}\n\r") - commandsEnd = wrapSkip (string "]") >> oneOf "}," + commandsEnd = wrapSkip (string "]") >> (string "}" <|> notNextRun) + notNextRun = do { string ","; notFollowedBy $ wrapSkip $ string "Run"; return ","} readCommands = manyTill anyChar (try commandsEnd) >>= read' commandsErr . flip (++) "]" strField e n = field e n . between (strDel "start" n) (strDel "end" n) . many $ noneOf "\"\n\r" |