jgm/pandoc — pull request #1547 by jkr (2014-08-17 21:08:53+00:00)
Title: Docx reader: parsing styles

This allows us to use user-defined styles. It parses the styles.xml file, and can handle dependent styles (essentially cascading styles that build on one another).

A couple of points:

1. We build the dependent styles list from the bottom up. I.e., we get the independent ones, then the ones that depend on them, and so on. Therefore, we're not subject to some sort of infinite reference based on undefined behavior or some malicious party messing with the xml. If something doesn't resolve, we never see it.

2. We have a blacklisted character styles list in Docx.hs. This is for things like the HyperLink style (underline). These are styles, whether depdendent or independent, that we want to ignore. Only Hyperlink is in there now, but the list can be added to.