aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Stahl <[email protected]>2023-04-27 14:37:06 +0200
committerJohn MacFarlane <[email protected]>2023-04-28 12:17:22 -0700
commitf3e1d33ea074968c9a96db2ecf0059c398709ea6 (patch)
tree7e62d423b91fedb5c9630856151cebc6d2df060c /src
parent3894f8847840f5c5c6e31e08f00827477a32f2ab (diff)
Writers.ODT: stop validator complaints by producing ODF 1.3
The ODF validator complains about an invalid attribute style:contextual-spacing in styles.xml, ultimately an implementation error in whatever old version of LibreOffice that produced the data/odt/styles.xml (should have put it into an extension namespace). Fortunately the attribute was added to ODF 1.3, which was released a couple years ago. So the easiest fix is to simply produce ODF 1.3 instead of 1.2; it's supposed to be fully backward compatible.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs
index 2061c04b4..4d11ee331 100644
--- a/src/Text/Pandoc/Writers/ODT.hs
+++ b/src/Text/Pandoc/Writers/ODT.hs
@@ -113,7 +113,7 @@ pandocToODT opts doc@(Pandoc meta _) = do
Just m -> selfClosingTag "manifest:file-entry"
[("manifest:media-type", m)
,("manifest:full-path", T.pack fp)
- ,("manifest:version", "1.2")
+ ,("manifest:version", "1.3")
]
let files = [ ent | ent <- filesInArchive archive,
not ("META-INF" `isPrefixOf` ent) ]
@@ -125,7 +125,7 @@ pandocToODT opts doc@(Pandoc meta _) = do
$$
inTags True "manifest:manifest"
[("xmlns:manifest","urn:oasis:names:tc:opendocument:xmlns:manifest:1.0")
- ,("manifest:version","1.2")] ( selfClosingTag "manifest:file-entry"
+ ,("manifest:version","1.3")] ( selfClosingTag "manifest:file-entry"
[("manifest:media-type","application/vnd.oasis.opendocument.text")
,("manifest:full-path","/")]
$$ vcat ( map toFileEntry files )
@@ -157,7 +157,7 @@ pandocToODT opts doc@(Pandoc meta _) = do
,("xmlns:meta","urn:oasis:names:tc:opendocument:xmlns:meta:1.0")
,("xmlns:ooo","http://openoffice.org/2004/office")
,("xmlns:grddl","http://www.w3.org/2003/g/data-view#")
- ,("office:version","1.2")] ( inTags True "office:meta" []
+ ,("office:version","1.3")] ( inTags True "office:meta" []
( metaTag "meta:generator" ("Pandoc/" <> pandocVersionText)
$$
metaTag "dc:title" (stringify title)
@@ -297,7 +297,7 @@ documentSettings isTextMode = fromStringLazy $ render Nothing
,("xmlns:xlink","http://www.w3.org/1999/xlink")
,("xmlns:config","urn:oasis:names:tc:opendocument:xmlns:config:1.0")
,("xmlns:ooo","http://openoffice.org/2004/office")
- ,("office:version","1.2")] (
+ ,("office:version","1.3")] (
inTagsSimple "office:settings" $
inTags False "config:config-item-set"
[("config:name", "ooo:configuration-settings")] $