@@ -776,17 +776,13 @@ read_frame_text_box :: InlineMatcher
776776read_frame_text_box = matchingElement NsDraw "text-box"
777777 $ proc blocks -> do
778778 paragraphs <- (matchChildContent' [ read_paragraph ]) -< blocks
779− case toList paragraphs of
780− (p : []) -> -- require only a single paragraph
781− arr read_img_with_caption -< p
782− _ ->
783− arr fromList -< []
784−
785−read_img_with_caption :: Block -> Inlines
786−read_img_with_caption (Para ((Image attr _ target) : txt)) =
787− singleton (Image attr txt target) -- override caption with the text that follows
779+ arr read_img_with_caption -< toList paragraphs
780+
781+read_img_with_caption :: [Block] -> Inlines
782+read_img_with_caption ((Para ((Image attr _ target) : txt)) : _) =
783+ singleton (Image attr txt target) -- override caption with the text that follows
788784read_img_with_caption _ =
789− fromList []
785+ mempty
790786
791787----------------------
792788-- Internal links