diff --git a/Text/Lucius.hs b/Text/Lucius.hs
--- a/Text/Lucius.hs
+++ b/Text/Lucius.hs
@@ -51,7 +51,9 @@
   $ either (error . show) id $ parse parseTopLevels s s
 
 whiteSpace :: Parser ()
-whiteSpace = many (oneOf " \t\n\r" >> return ()) >> return () -- FIXME comments, don't use many
+whiteSpace = many
+    ((oneOf " \t\n\r" >> return ()) <|> (parseComment >> return ()))
+    >> return () -- FIXME comments, don't use many
 
 parseBlock :: Parser Block
 parseBlock = do
@@ -129,10 +131,12 @@
         go (d, False) = ContentUrl d
         go (d, True) = ContentUrlParam d
     parseChar = (ContentRaw . return) `fmap` noneOf restricted
-    parseComment = do
-        _ <- try $ string "/*"
-        _ <- manyTill anyChar $ try $ string "*/"
-        return $ ContentRaw ""
+
+parseComment :: Parser Content
+parseComment = do
+    _ <- try $ string "/*"
+    _ <- manyTill anyChar $ try $ string "*/"
+    return $ ContentRaw ""
 
 luciusFile :: FilePath -> Q Exp
 luciusFile fp = do
diff --git a/hamlet.cabal b/hamlet.cabal
--- a/hamlet.cabal
+++ b/hamlet.cabal
@@ -1,5 +1,5 @@
 name:            hamlet
-version:         0.8.2
+version:         0.8.2.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -27,7 +27,13 @@
 build-type:      Simple
 homepage:        http://www.yesodweb.com/
 
+flag test
+  description: Build the executable to run unit tests
+  default: False
+
 library
+    if flag(test)
+        Buildable: False
     build-depends:   base             >= 4       && < 5
                    , bytestring       >= 0.9     && < 0.10
                    , template-haskell
@@ -53,6 +59,24 @@
                      Text.MkSizeType
                      Text.Css
     ghc-options:     -Wall
+
+test-suite runtests
+    hs-source-dirs: tests
+    main-is: runtests.hs
+    type: exitcode-stdio-1.0
+
+    ghc-options:   -Wall
+    build-depends: hamlet >= 0.7.2,
+                   base             >= 4       && < 5,
+                   parsec           >= 2       && < 4,
+                   containers       >= 0.2     && < 0.5,
+                   json-types       >= 0.1     && < 0.2,
+                   text             >= 0.7     && < 0.12,
+                   HUnit,
+                   QuickCheck >= 2 && < 3,
+                   test-framework-hunit,
+                   test-framework
+
 
 source-repository head
   type:     git
