diff options
author | Milan Bracke <mbracke@antidot.net> | 2021-06-14 15:00:36 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-10-18 19:15:40 -0700 |
commit | 193f6bfebaa43d0d6749d10a4e7ca78a0d31361d (patch) | |
tree | d7d84ad824082520b1bb7878864d67cd904a7a57 /test/Tests | |
parent | 8de261ba4e1e03f9dd5f78297d7299e9d78bbcfd (diff) | |
download | pandoc-193f6bfebaa43d0d6749d10a4e7ca78a0d31361d.tar.gz |
Docx reader: fix handling of nested fields
Fields delimited by fldChar elements can contain other fields. Before,
the nested fields would be ignored, except for the end, which would be
considered the end of the parent field.
To fix this issue, fields needed to be considered containing ParParts
instead of Runs, since a Run can't represent complex enough structures.
This also impacted Hyperlinks since they can originate from a field.
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Readers/Docx.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs index 2f28af317..af6023836 100644 --- a/test/Tests/Readers/Docx.hs +++ b/test/Tests/Readers/Docx.hs @@ -148,6 +148,10 @@ tests = [ testGroup "document" "docx/instrText_hyperlink.docx" "docx/instrText_hyperlink.native" , testCompare + "nested fields with <w:instrText> tag" + "docx/nested_instrText.docx" + "docx/nested_instrText.native" + , testCompare "inline image" "docx/image.docx" "docx/image_no_embed.native" |