From 72fd871710f094e57b1888e9242216b3b36c4c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 28 Jun 2017 20:30:26 +0200 Subject: [PATCH] hugolib: Add more summary test Closes #2973 --- hugolib/page_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hugolib/page_test.go b/hugolib/page_test.go index 66fc5d253..88724cd1c 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -817,6 +817,29 @@ func TestPageWithMoreTagOnlySummary(t *testing.T) { testAllMarkdownEnginesForPages(t, assertFunc, nil, simplePageWithSummaryDelimiterOnlySummary) } +// #2973 +func TestSummaryWithHTMLTagsOnNextLine(t *testing.T) { + + assertFunc := func(t *testing.T, ext string, pages Pages) { + p := pages[0] + require.Contains(t, p.Summary, "Happy new year everyone!") + require.NotContains(t, p.Summary, "User interface") + } + + testAllMarkdownEnginesForPages(t, assertFunc, nil, `--- +title: Simple +--- +Happy new year everyone! + +Here is the last report for commits in the year 2016. It covers hrev50718-hrev50829. + + + +

User interface

+ +`) +} + func TestPageWithDate(t *testing.T) { t.Parallel() cfg, fs := newTestCfg()