summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2014-06-25 10:38:01 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2014-06-25 10:38:01 -0400
commited44e4ca8c8f3d3c4c7ac65b98f16732c8173b88 (patch)
tree33f075559d5ae39e91bc35ec70801df9d0313f1a /src/Text
parent38e1d3e95b8240eeb35db0a1a56e308cfb4835e4 (diff)
Docx reader: Add rudimentary track changes support.
This will only read the insertions, and ignore the deletions.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs3
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) =