summaryrefslogtreecommitdiffstats
path: root/hugolib/page_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-05 13:30:16 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-05 14:14:28 +0100
commitd16a7a33ff1f22b9fa357189a901a4f1de4e65e7 (patch)
tree3860dd6ec35d7a22f157dc000d07fa2977e4866c /hugolib/page_test.go
parent5b1edd281a493bdb27af4dc3c8fae7e10dd54830 (diff)
Fix shortcode directly following a shortcode delimiter
Fixes #5402
Diffstat (limited to 'hugolib/page_test.go')
-rw-r--r--hugolib/page_test.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index 18be64cee..b421a1b40 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -1513,7 +1513,13 @@ Content.
b.WithContent("page-md-shortcode-same-line.md", `---
title: "Hugo"
---
-This is a {{< sc >}}.<!--more-->Same line.
+This is a {{< sc >}}<!--more-->Same line.
+`)
+
+ b.WithContent("page-md-shortcode-same-line-after.md", `---
+title: "Hugo"
+---
+Summary<!--more-->{{< sc >}}
`)
b.WithContent("page-org-shortcode.org", `#+TITLE: T1
@@ -1547,8 +1553,13 @@ CONTENT:{{ .Content }}
)
b.AssertFileContent("public/page-md-shortcode-same-line/index.html",
- "SUMMARY:<p>This is a a shortcode.</p>:END",
- "CONTENT:<p>This is a a shortcode.</p>\n\n<p>Same line.</p>\n",
+ "SUMMARY:<p>This is a a shortcode</p>:END",
+ "CONTENT:<p>This is a a shortcode</p>\n\n<p>Same line.</p>\n",
+ )
+
+ b.AssertFileContent("public/page-md-shortcode-same-line-after/index.html",
+ "SUMMARY:<p>Summary</p>:END",
+ "CONTENT:<p>Summary</p>\n\na shortcode",
)
b.AssertFileContent("public/page-org-shortcode/index.html",