aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Docx
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-02-28 16:27:18 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-02-28 16:32:20 -0500
commit7d3e7a5a6d9e7b139fd15e10a52b85f87aba42b1 (patch)
tree3c9ea9021a3dd72867820cf21653d73bcc031544 /src/Text/Pandoc/Readers/Docx
parentcc3477192809030044dc0729c42fcf4cf96bb5a9 (diff)
downloadpandoc-7d3e7a5a6d9e7b139fd15e10a52b85f87aba42b1.tar.gz
Docx reader: Handle nested sdt tags.
Previously we had only unwrapped one level of sdt tags. Now we recurse if we find them. Closes: #4415
Diffstat (limited to 'src/Text/Pandoc/Readers/Docx')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs
index c123a0018..1f7f07e36 100644
--- a/src/Text/Pandoc/Readers/Docx/Parse.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse.hs
@@ -136,7 +136,7 @@ unwrapSDT :: NameSpaces -> Content -> [Content]
unwrapSDT ns (Elem element)
| isElem ns "w" "sdt" element
, Just sdtContent <- findChildByName ns "w" "sdtContent" element
- = map Elem $ elChildren sdtContent
+ = concatMap (unwrapSDT ns) $ map Elem $ elChildren sdtContent
unwrapSDT _ content = [content]
unwrapSDTchild :: NameSpaces -> Content -> Content