summaryrefslogtreecommitdiffstats
path: root/hugolib/page_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-24 17:06:26 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-24 18:23:23 +0100
commit94ab125b27a29a65e5ea45efd99dd247084b4c37 (patch)
tree99281fbd9390aa04086ca8dc5c71fb7df37de086 /hugolib/page_test.go
parentdcfeed35c6e14c1ce593d23be9d2b89c66ce9bee (diff)
parser/pageparser: Fix when only shortcode and then summary
Fixes #5464
Diffstat (limited to 'hugolib/page_test.go')
-rw-r--r--hugolib/page_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index b421a1b40..f9c26754b 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -1510,6 +1510,15 @@ This is a {{< sc >}}.
Content.
`)
+ // https://github.com/gohugoio/hugo/issues/5464
+ b.WithContent("page-md-only-shortcode.md", `---
+title: "Hugo"
+---
+{{< sc >}}
+<!--more-->
+{{< sc >}}
+`)
+
b.WithContent("page-md-shortcode-same-line.md", `---
title: "Hugo"
---
@@ -1570,6 +1579,11 @@ CONTENT:{{ .Content }}
"SUMMARY:<p>Summary.</p>:END",
"CONTENT:<p>Summary.</p>\n\n<p>Content.\t</p>\n",
)
+
+ b.AssertFileContent("public/page-md-only-shortcode/index.html",
+ "SUMMARY:a shortcode:END",
+ "CONTENT:a shortcode\n\na shortcode\n",
+ )
}
// TODO(bep) this may be useful for other tests.