From 2d60524de43d59ffb1763a33a15cc2ecce613ecf Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sat, 10 Apr 2021 11:38:02 +0200 Subject: JATS writer: convert spans to elements Spans with attributes are converted to `` elements instead of being wrapped with `` and `` elements. Milestone elements are not allowed in documents using the articleauthoring tag set, so this change ensures the creation of valid documents. Closes: #7211 --- test/Tests/Writers/JATS.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/Tests/Writers') diff --git a/test/Tests/Writers/JATS.hs b/test/Tests/Writers/JATS.hs index 23c1686dc..e90438176 100644 --- a/test/Tests/Writers/JATS.hs +++ b/test/Tests/Writers/JATS.hs @@ -142,4 +142,19 @@ tests = codeWith ("7y",[],[]) "print 5" =?> "

print 5

" ] + + , testGroup "spans" + [ "unwrapped if no attributes given" =: + spanWith nullAttr "text in span" =?> + "

text in span

" + + , "converted to named-content element" =: + spanWith ("a", ["ignored"], [("alt", "aa")]) "text" =?> + "

text

" + + , "unwrapped if named-content element would have no attributes" =: + spanWith ("", ["ignored"], [("hidden", "true")]) "text in span" =?> + "

text in span

" + + ] ] -- cgit v1.2.3