diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2014-06-25 10:38:01 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2014-06-25 10:38:01 -0400 |
commit | ed44e4ca8c8f3d3c4c7ac65b98f16732c8173b88 (patch) | |
tree | 33f075559d5ae39e91bc35ec70801df9d0313f1a /src/Text/Pandoc/Readers | |
parent | 38e1d3e95b8240eeb35db0a1a56e308cfb4835e4 (diff) | |
download | pandoc-ed44e4ca8c8f3d3c4c7ac65b98f16732c8173b88.tar.gz |
Docx reader: Add rudimentary track changes support.
This will only read the insertions, and ignore the deletions.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index b787ca9fb..130e2a1e2 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -234,6 +234,9 @@ runToInlines opts docx@(Docx _ notes _ _ _) (Endnote fnId) = parPartToInlines :: ReaderOptions -> Docx -> ParPart -> [Inline] parPartToInlines opts docx (PlainRun r) = runToInlines opts docx r +parPartToInlines opts docx (Insertion _ _ _ runs) = + concatMap (runToInlines opts docx) runs +parPartToInlines _ _ (Deletion _ _ _ _) = [] parPartToInlines _ _ (BookMark _ anchor) | anchor `elem` dummyAnchors = [] parPartToInlines _ _ (BookMark _ anchor) = [Span (anchor, ["anchor"], []) []] parPartToInlines _ (Docx _ _ _ rels _) (Drawing relid) = |