aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-02-19 11:26:29 -0800
committerJohn MacFarlane <[email protected]>2024-02-19 11:26:29 -0800
commita6d85a0c983fa907f700f828881400af536ea01d (patch)
tree356648d6259d0a0bfa6a390bc5eae3d31e81137d
parent8a0e522c3901411e15c248a45fbc286b1ad35244 (diff)
Org writer: omit extra blank line at end of quote block.
-rw-r--r--src/Text/Pandoc/Writers/Org.hs2
-rw-r--r--test/writer.org7
2 files changed, 1 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index 407c0a637..6704cf6f0 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -206,7 +206,7 @@ blockToOrg (CodeBlock (ident,classes,kvs) str) = do
blockToOrg (BlockQuote blocks) = do
contents <- blockListToOrg blocks
return $ blankline $$ "#+begin_quote" $$
- contents $$ "#+end_quote" $$ blankline
+ chomp contents $$ "#+end_quote" $$ blankline
blockToOrg (Table _ blkCapt specs thead tbody tfoot) = do
let (caption', _, _, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot
caption'' <- inlineListToOrg caption'
diff --git a/test/writer.org b/test/writer.org
index dc51ce143..48c2080ce 100644
--- a/test/writer.org
+++ b/test/writer.org
@@ -75,7 +75,6 @@ E-mail style:
#+begin_quote
This is a block quote. It is pretty short.
-
#+end_quote
#+begin_quote
@@ -96,14 +95,11 @@ Nested block quotes:
#+begin_quote
nested
-
#+end_quote
#+begin_quote
nested
-
#+end_quote
-
#+end_quote
This should not be a block quote: 2 > 1.
@@ -345,7 +341,6 @@ Multiple blocks with italics:
#+begin_quote
orange block quote
-
#+end_quote
Multiple definitions, tight:
@@ -753,7 +748,6 @@ An e-mail address: [[mailto:[email protected]][[email protected]]]
#+begin_quote
Blockquoted: [[http://example.com/]]
-
#+end_quote
Auto-links should not occur here: =<http://example.com/>=
@@ -787,7 +781,6 @@ note.[fn:3]
#+begin_quote
Notes can go in quotes.[fn:4]
-
#+end_quote
1. And in list items.[fn:5]