@@ -231,7 +231,9 @@ yamlTitleBlock = try $ do
231231 pos <- getPosition
232232 string "---"
233233 blankline
234− rawYaml <- unlines <$> manyTill anyLine stopLine
234+ rawYamlLines <- manyTill anyLine stopLine
235+ -- by including --- and ..., we allow yaml blocks with just comments:
236+ let rawYaml = unlines ("---" : (rawYamlLines ++ ["..."]))
235237 optional blanklines
236238 opts <- stateOptions <$> getState
237239 case Yaml.decodeEither' $ UTF8.fromString rawYaml of
@@ -241,6 +243,7 @@ yamlTitleBlock = try $ do
241243 then f
242244 else B.setMeta (T.unpack k) (yamlToMeta opts v) . f)
243245 id hashmap
246+ Right Yaml.Null -> return $ return id
244247 Right _ -> do
245248 addWarning (Just pos) "YAML header is not an object"
246249 return $ return id