diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2017-11-01 13:31:16 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2017-11-01 13:31:16 +0300 |
commit | 3cee9c89768de064910deedbce3d8d28c1ffef84 (patch) | |
tree | f30a17021e758064a90ad06994bbae729badbb27 /src/Text/Pandoc | |
parent | 8a5541dca88190e6fdf6ed9ff5c1c5c69c3c9710 (diff) | |
download | pandoc-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.hs | 3 |
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 ] |