From e2edb33b9d92a1e7012b6dbf963daa91043b67e4 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 1 Aug 2024 08:58:21 +0200 Subject: [PATCH] Dont add newline after CDATA Fixes: #220 Signed-off-by: Miek Gieben --- render/xml/renderer.go | 2 +- testdata/artwork.xml | 3 +-- testdata/code-caption-id.xml | 3 +-- testdata/figure-anchor.xml | 3 +-- testdata/include-block-caption.xml | 3 +-- testdata/include-block.xml | 3 +-- testdata/sourcecode.xml | 3 +-- testdata/table-codeblock.xml | 3 +-- 8 files changed, 8 insertions(+), 15 deletions(-) diff --git a/render/xml/renderer.go b/render/xml/renderer.go index 567839e..db8942f 100644 --- a/render/xml/renderer.go +++ b/render/xml/renderer.go @@ -533,7 +533,7 @@ func (r *Renderer) codeBlock(w io.Writer, codeBlock *ast.CodeBlock) { } else { r.outs(w, "\n") + r.outs(w, "]]>") } r.outs(w, "") r.cr(w) diff --git a/testdata/artwork.xml b/testdata/artwork.xml index f3c5962..793ea70 100644 --- a/testdata/artwork.xml +++ b/testdata/artwork.xml @@ -1,3 +1,2 @@ - +]]> diff --git a/testdata/code-caption-id.xml b/testdata/code-caption-id.xml index 7f0b2e4..d59c95a 100644 --- a/testdata/code-caption-id.xml +++ b/testdata/code-caption-id.xml @@ -1,5 +1,4 @@
This is a proper caption. - +]]>
diff --git a/testdata/figure-anchor.xml b/testdata/figure-anchor.xml index e8d700e..72f4ab8 100644 --- a/testdata/figure-anchor.xml +++ b/testdata/figure-anchor.xml @@ -6,6 +6,5 @@ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRO Param | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -]]> - +]]> diff --git a/testdata/include-block-caption.xml b/testdata/include-block-caption.xml index 2e86185..ba4942f 100644 --- a/testdata/include-block-caption.xml +++ b/testdata/include-block-caption.xml @@ -3,7 +3,6 @@ - +]]> And some other text. diff --git a/testdata/include-block.xml b/testdata/include-block.xml index 57cc628..6fc1b14 100644 --- a/testdata/include-block.xml +++ b/testdata/include-block.xml @@ -1,6 +1,5 @@ - +]]> And some other text. diff --git a/testdata/sourcecode.xml b/testdata/sourcecode.xml index 498a882..9068f14 100644 --- a/testdata/sourcecode.xml +++ b/testdata/sourcecode.xml @@ -1,3 +1,2 @@ - +]]> diff --git a/testdata/table-codeblock.xml b/testdata/table-codeblock.xml index 37f14b7..e04b5d9 100644 --- a/testdata/table-codeblock.xml +++ b/testdata/table-codeblock.xml @@ -15,5 +15,4 @@ - +]]>