git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: Add rudimentary track changes support.

This will only read the insertions, and ignore the deletions.

commited44e4ca8c8f3d3c4c7ac65b98f16732c8173b88 authorJesse Rosenthal <jrosenthal@jhu.edu> dateWed 25 Jun 2014, 10:38 (12 years ago) parent38e1d3e
1 file changed+3
src/Text/Pandoc/Readers/Docx.hs+3
src/Text/Pandoc/Readers/Docx.hs+3
@@ -234,6 +234,9 @@ runToInlines opts docx@(Docx _ notes _ _ _) (Endnote fnId) =
234234
235235parPartToInlines :: ReaderOptions -> Docx -> ParPart -> [Inline]
236236parPartToInlines opts docx (PlainRun r) = runToInlines opts docx r
237+parPartToInlines opts docx (Insertion _ _ _ runs) =
238+ concatMap (runToInlines opts docx) runs
239+parPartToInlines _ _ (Deletion _ _ _ _) = []
237240parPartToInlines _ _ (BookMark _ anchor) | anchor `elem` dummyAnchors = []
238241parPartToInlines _ _ (BookMark _ anchor) = [Span (anchor, ["anchor"], []) []]
239242parPartToInlines _ (Docx _ _ _ rels _) (Drawing relid) =