diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2019-02-12 16:27:09 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2019-02-12 16:36:54 -0500 |
commit | 8552e188cdac82ad6810a9b58450671fc4ceca18 (patch) | |
tree | 50ebed0c688782382eae0541af7a1508e8d4ca40 /src/Text | |
parent | bb2fa73500f18df381d01996962468de185a0a57 (diff) | |
download | pandoc-8552e188cdac82ad6810a9b58450671fc4ceca18.tar.gz |
Docx reader: unwrap sdt elements in footnotes and comments.
We had previously walked the document to unwrap sdt/sdtContent and
smartTag tags in `word/document.xml`, but not in the
`word/{foot/end}note.xml` and `word/comments.xml`.
Closes #5302
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx/Parse.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index 16bd487f4..468bc0acc 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -486,8 +486,8 @@ archiveToNotes zf = Just e -> elemToNameSpaces e Nothing -> [] ns = unionBy (\x y -> fst x == fst y) fn_namespaces en_namespaces - fn = fnElem >>= elemToNotes ns "footnote" - en = enElem >>= elemToNotes ns "endnote" + fn = fnElem >>= walkDocument ns >>= elemToNotes ns "footnote" + en = enElem >>= walkDocument ns >>= elemToNotes ns "endnote" in Notes ns fn en @@ -498,7 +498,7 @@ archiveToComments zf = cmts_namespaces = case cmtsElem of Just e -> elemToNameSpaces e Nothing -> [] - cmts = elemToComments cmts_namespaces <$> cmtsElem + cmts = elemToComments cmts_namespaces <$> (cmtsElem >>= walkDocument cmts_namespaces) in case cmts of Just c -> Comments cmts_namespaces c |