From 1ad9679dc9147a778d272003c868d4d4f638fd31 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 8 Aug 2017 14:00:13 -0700 Subject: CommonMark writer: avoid excess blank lines at end of output. --- src/Text/Pandoc/Writers/CommonMark.hs | 2 +- test/command/gfm.md | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Text/Pandoc/Writers/CommonMark.hs b/src/Text/Pandoc/Writers/CommonMark.hs index 20a22e051..77562ed8a 100644 --- a/src/Text/Pandoc/Writers/CommonMark.hs +++ b/src/Text/Pandoc/Writers/CommonMark.hs @@ -86,7 +86,7 @@ blocksToCommonMark opts bs = do then Just $ writerColumns opts else Nothing nodes <- blocksToNodes opts bs - return $ + return $ T.stripEnd $ nodeToCommonmark cmarkOpts colwidth $ node DOCUMENT nodes diff --git a/test/command/gfm.md b/test/command/gfm.md index 6dd080dc1..670f3cd6e 100644 --- a/test/command/gfm.md +++ b/test/command/gfm.md @@ -71,8 +71,6 @@ My:thumbsup:emoji:heart: | orange | 1.12 | The caption. - - ``` ``` @@ -80,8 +78,6 @@ The caption. “hi” ^D "hi" - - ``` ``` @@ -89,8 +85,6 @@ The caption. "hi" ^D “hi” - - ``` ``` @@ -98,8 +92,6 @@ The caption. "hi" ^D "hi" - - ``` ``` -- cgit v1.2.3