aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers
diff options
context:
space:
mode:
authorBen Steinberg <bsteinberg@law.harvard.edu>2019-09-21 01:13:29 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-20 22:13:29 -0700
commit7389919bb491b78373ea2197800988b3a61cf0ce (patch)
tree1f8dbcae39a7d60b9c4e1f7761d1cce767068025 /test/Tests/Writers
parent5ebd5105ad13d0c969a5894963e79e88033114c5 (diff)
downloadpandoc-7389919bb491b78373ea2197800988b3a61cf0ce.tar.gz
Preserve built-in styles in DOCX with custom style (#5670)
This commit prevents custom styles on divs and spans from overriding styles on certain elements inside them, like headings, blockquotes, and links. On those elements, the "native" style is required for the element to display correctly. This change also allows nesting of custom styles; in order to do so, it removes the default "Compact" style applied to Plain blocks, except when inside a table.
Diffstat (limited to 'test/Tests/Writers')
-rw-r--r--test/Tests/Writers/Docx.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Tests/Writers/Docx.hs b/test/Tests/Writers/Docx.hs
index c958ddf7d..9e1414c40 100644
--- a/test/Tests/Writers/Docx.hs
+++ b/test/Tests/Writers/Docx.hs
@@ -155,6 +155,10 @@ tests = [ testGroup "inlines"
def{writerReferenceDoc = Just "docx/custom-style-reference.docx"}
"docx/custom_style.native"
"docx/golden/custom_style_reference.docx"
+ , docxTest "suppress custom style for headers and blockquotes"
+ def
+ "docx/custom-style-preserve.native"
+ "docx/golden/custom_style_preserve.docx"
]
, testGroup "metadata"
[ docxTest "document properties (core, custom)"