packages feed

herbalizer 0.4.8 → 0.4.9

raw patch · 2 files changed

+7/−2 lines, 2 files

Files

herbalizer.cabal view
@@ -1,5 +1,5 @@ Name: herbalizer-Version: 0.4.8+Version: 0.4.9  Synopsis: HAML to ERB translator Description:
src/Main.hs view
@@ -49,7 +49,7 @@   return b  expression :: IParser Expression-expression = docType <|> comment <|> hamlFilter <|> startPlainText <|> rubyBlock <|> rubyExp <|> tag <|>  genericExpression+expression = (try escapeHtmlExpr <|> docType) <|> comment <|> hamlFilter <|> startPlainText <|> rubyBlock <|> rubyExp <|> tag <|>  genericExpression    rubyBlock = do     char '-'@@ -62,6 +62,11 @@     -- e.g. "- localvar = Time.now"     else return (RubyStartBlock (k ++ rest) False)   where midBlockKeywords = ["else", "elsif", "rescue", "ensure", "when", "end"]++escapeHtmlExpr = do+  char '!'+  line <- ((:) <$> char '=' >> spaces >> manyTill anyChar newline <* spaces)+  return $ RubyExp $ "raw(" ++ line ++ ")"  rubyExp = do   line <- ((:) <$> char '=' >> spaces >> manyTill anyChar newline <* spaces)