diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-08-07 13:41:58 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-08-07 13:41:58 -0700 |
commit | 44dad5286631748b6ed8571f2bcf6a7828e06a79 (patch) | |
tree | ed4cc21befb33021fa94376a47fd4e20ba5ecaca /src/Text/Pandoc/Readers/Docx.hs | |
parent | 482f7f8e157b713b5dcf81303844721d827b16de (diff) | |
parent | 98d14b2b2a20111d68bdfbaf358da41537ea71c9 (diff) |
Merge pull request #1495 from jkr/inline-drawings
Docx reader: Inline image fix
Diffstat (limited to 'src/Text/Pandoc/Readers/Docx.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index 367e26bd0..f19570aec 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -321,6 +321,13 @@ runToInlines (Footnote bps) = concatMapM bodyPartToBlocks bps >>= (\blks -> return [Note blks]) runToInlines (Endnote bps) = concatMapM bodyPartToBlocks bps >>= (\blks -> return [Note blks]) +runToInlines (InlineDrawing fp bs) = do + mediaBag <- gets docxMediaBag + modify $ \s -> s { docxMediaBag = insertMedia fp Nothing bs mediaBag } + return [Image [] (fp, "")] + + + parPartToInlines :: ParPart -> DocxContext [Inline] parPartToInlines (PlainRun r) = runToInlines r |