@@ -145,6 +145,12 @@ blockToRST Null = return empty
145145blockToRST (Plain inlines) = do
146146 opts <- get >>= (return . stOptions)
147147 wrappedRST opts inlines
148+blockToRST (Para [Image txt (src,tit)]) = do
149+ capt <- inlineListToRST txt
150+ let fig = text "figure:: " <> text src
151+ let align = text ":align: center"
152+ let alt = text ":alt: " <> if null tit then capt else text tit
153+ return $ (text ".. " <> (fig $$ align $$ alt $$ text "" $$ capt)) $$ text ""
148154blockToRST (Para inlines) = do
149155 opts <- get >>= (return . stOptions)
150156 contents <- wrappedRST opts inlines