diff options
Diffstat (limited to 'parser/pageparser/pageparser_intro_test.go')
-rw-r--r-- | parser/pageparser/pageparser_intro_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/parser/pageparser/pageparser_intro_test.go b/parser/pageparser/pageparser_intro_test.go index f818848bd..ba48a3ee3 100644 --- a/parser/pageparser/pageparser_intro_test.go +++ b/parser/pageparser/pageparser_intro_test.go @@ -39,6 +39,7 @@ var ( tstSomeText = nti(tText, "\nSome text.\n") tstSummaryDivider = nti(TypeLeadSummaryDivider, "<!--more-->\n") tstHtmlStart = nti(TypeHTMLStart, "<") + tstNewline = nti(tText, "\n") tstORG = ` #+TITLE: T1 @@ -70,6 +71,8 @@ var frontMatterTests = []lexerTest{ {"Summary divider same line", "+++\nfoo = \"bar\"\n+++\n\nSome text.<!--more-->Some text.\n", []Item{tstFrontMatterTOML, nti(tText, "\nSome text."), nti(TypeLeadSummaryDivider, "<!--more-->"), nti(tText, "Some text.\n"), tstEOF}}, // https://github.com/gohugoio/hugo/issues/5402 {"Summary and shortcode, no space", "+++\nfoo = \"bar\"\n+++\n\nSome text.\n<!--more-->{{< sc1 >}}\nSome text.\n", []Item{tstFrontMatterTOML, tstSomeText, nti(TypeLeadSummaryDivider, "<!--more-->"), tstLeftNoMD, tstSC1, tstRightNoMD, tstSomeText, tstEOF}}, + // https://github.com/gohugoio/hugo/issues/5464 + {"Summary and shortcode only", "+++\nfoo = \"bar\"\n+++\n{{< sc1 >}}\n<!--more-->\n{{< sc2 >}}", []Item{tstFrontMatterTOML, tstLeftNoMD, tstSC1, tstRightNoMD, tstNewline, tstSummaryDivider, tstLeftNoMD, tstSC2, tstRightNoMD, tstEOF}}, } func TestFrontMatter(t *testing.T) { |