aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-08-15 12:41:31 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-08-15 12:41:31 -0400
commit66d393ae7ad4199333ef1e61c0c012c169bea093 (patch)
treefd054c841869ecedc72d439209ffd11b210967c2 /src/Text/Pandoc
parentd6b60558e3d6e4e1f0aace48b37c904915561657 (diff)
downloadpandoc-66d393ae7ad4199333ef1e61c0c012c169bea093.tar.gz
Docx Writer: Keep track of dynamic text props too.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 51cdbb621..63ea3d07e 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -111,6 +111,7 @@ data WriterState = WriterState{
, stFirstPara :: Bool
, stTocTitle :: [Inline]
, stDynamicParaProps :: [String]
+ , stDynamicTextProps :: [String]
}
defaultWriterState :: WriterState
@@ -134,6 +135,7 @@ defaultWriterState = WriterState{
, stFirstPara = False
, stTocTitle = normalizeInlines [Str "Table of Contents"]
, stDynamicParaProps = []
+ , stDynamicTextProps = []
}
type WS a = StateT WriterState IO a
@@ -1013,6 +1015,7 @@ inlineToOpenXML opts SoftBreak = inlineToOpenXML opts (Str " ")
inlineToOpenXML opts (Span (ident,classes,kvs) ils)
| Just sty <- lookup dynamicStyleKey kvs = do
let kvs' = filter ((dynamicStyleKey, sty)/=) kvs
+ modify $ \s -> s{stDynamicTextProps = sty : (stDynamicTextProps s)}
withTextProp (rCustomStyle sty) $
inlineToOpenXML opts (Span (ident,classes,kvs') ils)
| "insertion" `elem` classes = do