@@ -211,11 +211,17 @@ blockToRST :: PandocMonad m
211 => Block -- ^ Block element
211 => Block -- ^ Block element
212 -> RST m Doc
212 -> RST m Doc
213blockToRST Null = return empty
213blockToRST Null = return empty
214−blockToRST (Div attr bs) = do
214+blockToRST (Div (ident,classes,_kvs) bs) = do
215 contents <- blockListToRST bs
215 contents <- blockListToRST bs
216− let startTag = ".. raw:: html" $+$ nest 3 (tagWithAttrs "div" attr)
216+ let classes' = filter (/= "container") classes
217− let endTag = ".. raw:: html" $+$ nest 3 "</div>"
218− return $ blankline <> startTag $+$ contents $+$ endTag $$ blankline
217+ return $ blankline $$
218+ (".. container::" <> space <>
219+ text (unwords classes')) $$
222+ else " :name: " <> text ident $$ blankline) $$
219blockToRST (Plain inlines) = inlineListToRST inlines
225blockToRST (Plain inlines) = inlineListToRST inlines
220-- title beginning with fig: indicates that the image is a figure
226-- title beginning with fig: indicates that the image is a figure
221blockToRST (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do
227blockToRST (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do