Docx reader: Add rudimentary track changes support.

This will only read the insertions, and ignore the deletions.
This commit is contained in:
Jesse Rosenthal 2014-06-25 10:38:01 -04:00
parent 38e1d3e95b
commit ed44e4ca8c

View file

@ -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) =