Permalink
Browse files

better comment handling

  • Loading branch information...
1 parent 7928f3c commit 0c05f4322420e9a16d9b0d2f051b53d74e5320f5 @singpolyma committed Nov 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mustache2hs.hs
View
@@ -79,9 +79,9 @@ parser = do
comment = mustache True $ do
_ <- char '!'
_ <- many $ do
- c1 <- anyChar
+ c1 <- peekChar
c2 <- peekChar
- if c1 /= '}' || c2 /= Just '}' then return c1 else
+ if c1 /= Just '}' || c2 /= Just '}' then anyChar else
fail "End of comment text"
return MuComment
sectionInv =

0 comments on commit 0c05f43

Please sign in to comment.