aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Pogodin <lunaticare@users.noreply.github.com>2019-11-03 18:17:05 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-03 07:17:05 -0800
commit270ffe6ab548de83287b7647269b0c8a18b9e8bf (patch)
treee10af2961bb3749e53e58589ccdd5be0b479c416 /src
parent8a2e87758e2f2b3fb74be177c2b28918dc35e27c (diff)
downloadpandoc-270ffe6ab548de83287b7647269b0c8a18b9e8bf.tar.gz
Place caption before table in OpenDocument format. (#5869)
Closes #5681.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index 7a3aa4973..9c6867797 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -404,9 +404,11 @@ blockToOpenDocument o bs
then return empty
else colHeadsToOpenDocument o (map fst paraHStyles) h
tr <- mapM (tableRowToOpenDocument o (map fst paraStyles)) r
- return $ inTags True "table:table" [ ("table:name" , name)
- , ("table:style-name", name)
- ] (vcat columns $$ th $$ vcat tr) $$ captionDoc
+ let tableDoc = inTags True "table:table" [
+ ("table:name" , name)
+ , ("table:style-name", name)
+ ] (vcat columns $$ th $$ vcat tr)
+ return $ captionDoc $$ tableDoc
figure attr caption source title | null caption =
withParagraphStyle o "Figure" [Para [Image attr caption (source,title)]]
| otherwise = do