diff --git a/Text/Hamlet/Parse.hs b/Text/Hamlet/Parse.hs
--- a/Text/Hamlet/Parse.hs
+++ b/Text/Hamlet/Parse.hs
@@ -73,13 +73,14 @@
     x <- doctype <|>
          comment <|>
          backslash <|>
-         try controlIf <|>
-         try controlElseIf <|>
-         try (string "$else" >> many (oneOf " \t") >> eol >> return LineElse) <|>
-         try controlMaybe <|>
-         try (string "$nothing" >> many (oneOf " \t") >> eol >> return LineNothing) <|>
-         try controlForall <|>
+         controlIf <|>
+         controlElseIf <|>
+         (try (string "$else") >> many (oneOf " \t") >> eol >> return LineElse) <|>
+         controlMaybe <|>
+         (try (string "$nothing") >> many (oneOf " \t") >> eol >> return LineNothing) <|>
+         controlForall <|>
          tag <|>
+         (eol' >> return (LineContent [])) <|>
          (do
             cs <- content InContent
             isEof <- (eof >> return True) <|> return False
@@ -103,21 +104,21 @@
         (eol >> return (LineContent [ContentRaw "\n"]))
             <|> (LineContent <$> content InContent)
     controlIf = do
-        _ <- string "$if"
+        _ <- try $ string "$if"
         spaces
         x <- deref False
         _ <- many $ oneOf " \t"
         eol
         return $ LineIf x
     controlElseIf = do
-        _ <- string "$elseif"
+        _ <- try $ string "$elseif"
         spaces
         x <- deref False
         _ <- many $ oneOf " \t"
         eol
         return $ LineElseIf x
     controlMaybe = do
-        _ <- string "$maybe"
+        _ <- try $ string "$maybe"
         spaces
         x <- deref False
         spaces
@@ -126,7 +127,7 @@
         eol
         return $ LineMaybe x y
     controlForall = do
-        _ <- string "$forall"
+        _ <- try $ string "$forall"
         spaces
         x <- deref False
         spaces
diff --git a/hamlet.cabal b/hamlet.cabal
--- a/hamlet.cabal
+++ b/hamlet.cabal
@@ -1,5 +1,5 @@
 name:            hamlet
-version:         0.6.1
+version:         0.6.1.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -28,7 +28,7 @@
     >         %p
     >             %a!href=@page.person@ See the page.
     >         ^footer^
-category:        Web
+category:        Web, Yesod
 stability:       unstable
 cabal-version:   >= 1.6
 build-type:      Simple
diff --git a/runtests.hs b/runtests.hs
--- a/runtests.hs
+++ b/runtests.hs
@@ -706,11 +706,13 @@
 %p
 
     foo
+
 |]
     celper "foo{bar:baz}" [$cassius|
 foo
 
     bar: baz
+
 |]
 
 caseLeadingSpaces :: Assertion
