From 5f79a66ed64e9b0cc326e467dcb17239f1596fcc Mon Sep 17 00:00:00 2001
From: Albert Krewinkel
Date: Fri, 16 Apr 2021 22:13:29 +0200
Subject: JATS writer: reduce unnecessary use of elements for wrapping
The `
` element is used for wrapping in cases were the contents would
otherwise not be allowed in a certain context. Unnecessary wrapping is
avoided, especially around quotes (`` elements).
Closes: #7227
---
test/command/7041.md | 23 ++++++++++
test/writer.jats_archiving | 68 +++++++++++++-----------------
test/writer.jats_articleauthoring | 88 ++++++++++++++++++---------------------
test/writer.jats_publishing | 68 +++++++++++++-----------------
4 files changed, 119 insertions(+), 128 deletions(-)
create mode 100644 test/command/7041.md
(limited to 'test')
diff --git a/test/command/7041.md b/test/command/7041.md
new file mode 100644
index 000000000..1773963b8
--- /dev/null
+++ b/test/command/7041.md
@@ -0,0 +1,23 @@
+```
+% pandoc -f html -t jats
+
+^D
+
+
+
+
+
+
+
+
+
+ Fly, you fools!
+
+ |
+
+
+
+
+```
diff --git a/test/writer.jats_archiving b/test/writer.jats_archiving
index 332b5d3fd..70e15b6b8 100644
--- a/test/writer.jats_archiving
+++ b/test/writer.jats_archiving
@@ -78,39 +78,31 @@ Gruber’s markdown test suite.
Block Quotes
E-mail style:
-
+
+ This is a block quote. It is pretty short.
+
+
+ Code in a block quote:
+ sub status {
+ print "working";
+}
+ A list:
+
+
+ item one
+
+
+ item two
+
+
+ Nested block quotes:
- This is a block quote. It is pretty short.
+ nested
-
-
- Code in a block quote:
- sub status {
- print "working";
-}
- A list:
-
-
- item one
-
-
- item two
-
-
- Nested block quotes:
-
-
- nested
-
-
-
-
- nested
-
-
+ nested
-
+
This should not be a block quote: 2 > 1.
And a following paragraph.
@@ -837,12 +829,10 @@ These should not be escaped: \$ \\ \> \[ \{
An e-mail address: nobody@nowhere.net
-
-
- Blockquoted:
- http://example.com/
-
-
+
+ Blockquoted:
+ http://example.com/
+
Auto-links should not occur here:
<http://example.com/>
or here: <http://example.com/>
@@ -866,11 +856,9 @@ These should not be escaped: \$ \\ \> \[ \{
not be a footnote reference, because it contains a
space.[^my note] Here is an inline
note.3
-
-
- Notes can go in quotes.4
-
-
+
+ Notes can go in quotes.4
+
And in list items.5
diff --git a/test/writer.jats_articleauthoring b/test/writer.jats_articleauthoring
index 956a30faa..59485a114 100644
--- a/test/writer.jats_articleauthoring
+++ b/test/writer.jats_articleauthoring
@@ -67,43 +67,39 @@ Gruber’s markdown test suite.
Block Quotes
E-mail style:
-
-
- This is a block quote. It is pretty short.
-
-
-
-
- Code in a block quote:
-
- sub status {
+
+ This is a block quote. It is pretty short.
+
+
+ Code in a block quote:
+
+ sub status {
print "working";
}
-
- A list:
-
-
-
- item one
-
-
- item two
-
-
-
- Nested block quotes:
-
-
- nested
-
-
-
-
- nested
-
-
-
-
+
+ A list:
+
+
+
+ item one
+
+
+ item two
+
+
+
+ Nested block quotes:
+
+
+ nested
+
+
+
+
+ nested
+
+
+
This should not be a block quote: 2 > 1.
And a following paragraph.
@@ -817,12 +813,10 @@ These should not be escaped: \$ \\ \> \[ \{
An e-mail address: nobody@nowhere.net
-
-
- Blockquoted:
- http://example.com/
-
-
+
+ Blockquoted:
+ http://example.com/
+
Auto-links should not occur here:
<http://example.com/>
or here: <http://example.com/>
@@ -860,13 +854,11 @@ These should not be escaped: \$ \\ \> \[ \{
and ] verbatim characters, as well as [bracketed
text].
-
-
- Notes can go in quotes.
- In quote.
-
-
-
+
+ Notes can go in quotes.
+ In quote.
+
+
And in list items.
diff --git a/test/writer.jats_publishing b/test/writer.jats_publishing
index f53fd554d..e6db4172a 100644
--- a/test/writer.jats_publishing
+++ b/test/writer.jats_publishing
@@ -78,39 +78,31 @@ Gruber’s markdown test suite.
Block Quotes
E-mail style:
-
+
+ This is a block quote. It is pretty short.
+
+
+ Code in a block quote:
+ sub status {
+ print "working";
+}
+ A list:
+
+
+ item one
+
+
+ item two
+
+
+ Nested block quotes:
- This is a block quote. It is pretty short.
+ nested
-
-
- Code in a block quote:
- sub status {
- print "working";
-}
- A list:
-
-
- item one
-
-
- item two
-
-
- Nested block quotes:
-
-
- nested
-
-
-
-
- nested
-
-
+ nested
-
+
This should not be a block quote: 2 > 1.
And a following paragraph.
@@ -837,12 +829,10 @@ These should not be escaped: \$ \\ \> \[ \{
An e-mail address: nobody@nowhere.net
-
-
- Blockquoted:
- http://example.com/
-
-
+
+ Blockquoted:
+ http://example.com/
+
Auto-links should not occur here:
<http://example.com/>
or here: <http://example.com/>
@@ -866,11 +856,9 @@ These should not be escaped: \$ \\ \> \[ \{
not be a footnote reference, because it contains a
space.[^my note] Here is an inline
note.3
-
-
- Notes can go in quotes.4
-
-
+
+ Notes can go in quotes.4
+
And in list items.5
--
cgit v1.2.3