aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-11-01 13:31:16 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-11-01 13:31:16 +0300
commit3cee9c89768de064910deedbce3d8d28c1ffef84 (patch)
treef30a17021e758064a90ad06994bbae729badbb27 /src/Text/Pandoc
parent8a5541dca88190e6fdf6ed9ff5c1c5c69c3c9710 (diff)
downloadpandoc-3cee9c89768de064910deedbce3d8d28c1ffef84.tar.gz
FB2 writer: Add "unrecognised" genre to <title-info>
XML schema requires at least one genre.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs
index 8986c1191..2d7516daf 100644
--- a/src/Text/Pandoc/Writers/FB2.hs
+++ b/src/Text/Pandoc/Writers/FB2.hs
@@ -112,6 +112,7 @@ pandocToFB2 opts (Pandoc meta blocks) = do
description :: PandocMonad m => Meta -> FBM m Content
description meta' = do
+ let genre = el "genre" "unrecognised"
bt <- booktitle meta'
let as = authors meta'
dd <- docdate meta'
@@ -121,7 +122,7 @@ description meta' = do
_ -> []
where iso639 = takeWhile (/= '-') -- Convert BCP 47 to ISO 639
return $ el "description"
- [ el "title-info" (bt ++ as ++ dd ++ lang)
+ [ el "title-info" (genre : (bt ++ as ++ dd ++ lang))
, el "document-info" [ el "program-used" "pandoc" ] -- FIXME: +version
]