diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-02-28 16:27:18 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-02-28 16:32:20 -0500 |
commit | 7d3e7a5a6d9e7b139fd15e10a52b85f87aba42b1 (patch) | |
tree | 3c9ea9021a3dd72867820cf21653d73bcc031544 /src/Text/Pandoc/Readers/Docx | |
parent | cc3477192809030044dc0729c42fcf4cf96bb5a9 (diff) | |
download | pandoc-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.hs | 2 |
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 |