diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -23,6 +23,7 @@
 import qualified Text.HPaco.Writers.Dependencies as Deps
 import qualified Text.HPaco.Writers.JsonLisp as JsonLisp
 import Text.HPaco.Writer (Writer)
+import Data.Char
 
 main = do
     argStruct <- parseArgs
@@ -52,16 +53,18 @@
         else withFile dstFilename WriteMode $ flip hPutStr dst
 
 roundTripYaml :: Monad m => String -> m String
-roundTripYaml s =
-    maybe (fail "Invalid YAML") (return . LBS8.toString . JSON.encode) .
-        (YAML.decode :: BS8.ByteString -> Maybe JSON.Value) .
-        BS8.fromString $ s
+roundTripYaml s
+    | all isSpace s = return ""
+    | otherwise =
+        maybe (fail "Invalid YAML") (return . LBS8.toString . JSON.encode) .
+            (YAML.decode :: BS8.ByteString -> Maybe JSON.Value) .
+            BS8.fromString $ s
 
 process :: CommandArgs -> String -> FilePath -> String -> IO String
 process cmdargs templateName filename src = do
     let reader = getReader cmdargs filename filename
         write = getWriter cmdargs templateName
-    rundata <- roundTripYaml $ caRunData cmdargs
+    rundata <- (roundTripYaml $ caRunData cmdargs)
     let pre = "{%with " ++ rundata ++ " %}\n"
         post = "{%endwith%}\n"
         src' = if null rundata
@@ -92,8 +95,14 @@
 getReader :: CommandArgs -> FilePath -> Reader
 getReader cmdargs filePath =
     case getEffectiveInputLanguage cmdargs filePath of
-        Paco -> readPaco
-        Capo -> readCapo
+        Paco -> readPaco' flavor
+        Capo -> readCapo' flavor
+    where
+        flavor =
+            case caPacoFlavor cmdargs of
+                Default -> defaultPacoFlavor
+                Jinja -> jinjaPacoFlavor
+                CSS -> cssPacoFlavor
 
 getEffectiveInputLanguage :: CommandArgs -> FilePath -> InputLanguage
 getEffectiveInputLanguage cmdargs filePath =
diff --git a/hpaco.cabal b/hpaco.cabal
--- a/hpaco.cabal
+++ b/hpaco.cabal
@@ -1,5 +1,5 @@
 name:                hpaco
-version:             0.26.0.0
+version:             0.28.0.0
 synopsis:            Modular template compiler
 description:         CLI front-end to the hpaco-lib library. Compiles Paco
                      template source code to JavaScript or PHP, or interprets
@@ -19,8 +19,8 @@
   -- other-modules:
   build-depends:       base == 4.*
                ,       filepath >= 1.1 && < 1.4
-               ,       cmdargs >= 0.9 && < 0.10
-               , hpaco-lib == 0.26.0.0
+               ,       cmdargs >= 0.9 && < 1.0
+               , hpaco-lib >= 0.28.0.0
                ,       strict >= 0.3
                ,       yaml >= 0.6
                ,       aeson >= 0.6
