@@ -658,6 +658,7 @@ directive' = do
658658 body <- option "" $ try $ blanklines >> indentedBlock
659659 optional blanklines
660660 let body' = body ++ "\n\n"
661+ name = trim $ fromMaybe "" (lookup "name" fields)
661662 imgAttr cl = ("", classes, widthAttr ++ heightAttr)
662663 where
663664 classes = words $ maybe "" trim (lookup cl fields) ++
@@ -691,7 +692,8 @@ directive' = do
691692 "line-block" -> lineBlockDirective body'
692693 "raw" -> return $ B.rawBlock (trim top) (stripTrailingNewlines body)
693694 "role" -> addNewRole top $ map (second trim) fields
694− "container" -> parseFromString' parseBlocks body'
695+ "container" -> B.divWith (name, "container" : words top, []) <$>
696+ parseFromString' parseBlocks body'
695697 "replace" -> B.para <$> -- consumed by substKey
696698 parseInlineFromString (trim top)
697699 "unicode" -> B.para <$> -- consumed by substKey