diff options
author | Nils Carlson <nils@nilscarlson.se> | 2020-10-26 19:49:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 12:49:03 -0700 |
commit | dd3d920ba096b3415e11ea0a26d1f5efa4b18cc9 (patch) | |
tree | 28560bb62b7a370f947da4f42a24955967422341 /src/Text/Pandoc/Readers | |
parent | 9ab04a92f83b9d9e1ec123c25c10f244e41654e0 (diff) | |
download | pandoc-dd3d920ba096b3415e11ea0a26d1f5efa4b18cc9.tar.gz |
DocBook Reader: fix duplicate bibliography bug (#6773)
Also add unit test to ensure the behavior stays consistent.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 26de68f5f..190ba1d31 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -794,11 +794,10 @@ parseBlock (Elem e) = "titleabbrev" -> skip "authorinitials" -> skip "bibliography" -> sect 0 - "bibliodiv" -> do - tit <- case filterChild (named "title") e of - Just _ -> sect 1 - Nothing -> return mempty - (tit <>) <$> parseMixed para (elContent e) + "bibliodiv" -> + case filterChild (named "title") e of + Just _ -> sect 1 + Nothing -> return mempty "biblioentry" -> parseMixed para (elContent e) "bibliomisc" -> parseMixed para (elContent e) "bibliomixed" -> parseMixed para (elContent e) |