diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-07-16 13:10:45 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-07-16 13:10:45 -0700 |
commit | 46099e79defe662e541b12548200caf29063c1c6 (patch) | |
tree | 58df737c0964601314e6b0410da853e22fdcdde9 | |
parent | 493522c5626464fb7a27216ccee381af4a199eef (diff) | |
download | pandoc-46099e79defe662e541b12548200caf29063c1c6.tar.gz |
DocBook reader: handle images with imageobjectco elements.
Closes #7440.
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index a31819ece..c49b82ccf 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -741,9 +741,9 @@ getMediaobject e = do figTitle <- gets dbFigureTitle ident <- gets dbFigureId (imageUrl, attr) <- - case filterChild (named "imageobject") e of - Nothing -> return (mempty, nullAttr) - Just z -> case filterChild (named "imagedata") z of + case filterElements (named "imageobject") e of + [] -> return (mempty, nullAttr) + (z:_) -> case filterChild (named "imagedata") z of Nothing -> return (mempty, nullAttr) Just i -> let atVal a = attrValue a i w = case atVal "width" of |