mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
Make Page.Content a method that returns interface{}
To prepare for a `Resource.Content` method. See #4622
This commit is contained in:
@@ -378,9 +378,9 @@ func doTestMultiSitesBuild(t *testing.T, configTemplate, configSuffix string) {
|
||||
b.AssertFileContent("public/en/tags/tag1/index.html", "Tag1|Hello|http://example.com/blog/en/tags/tag1/")
|
||||
|
||||
// Check Blackfriday config
|
||||
require.True(t, strings.Contains(string(doc1fr.Content), "«"), string(doc1fr.Content))
|
||||
require.False(t, strings.Contains(string(doc1en.Content), "«"), string(doc1en.Content))
|
||||
require.True(t, strings.Contains(string(doc1en.Content), "“"), string(doc1en.Content))
|
||||
require.True(t, strings.Contains(string(doc1fr.content), "«"), string(doc1fr.content))
|
||||
require.False(t, strings.Contains(string(doc1en.content), "«"), string(doc1en.content))
|
||||
require.True(t, strings.Contains(string(doc1en.content), "“"), string(doc1en.content))
|
||||
|
||||
// Check that the drafts etc. are not built/processed/rendered.
|
||||
assertShouldNotBuild(t, b.H)
|
||||
@@ -630,9 +630,9 @@ func assertShouldNotBuild(t *testing.T, sites *HugoSites) {
|
||||
for _, p := range s.rawAllPages {
|
||||
// No HTML when not processed
|
||||
require.Equal(t, p.shouldBuild(), bytes.Contains(p.workContent, []byte("</")), p.BaseFileName()+": "+string(p.workContent))
|
||||
require.Equal(t, p.shouldBuild(), p.Content != "", p.BaseFileName())
|
||||
require.Equal(t, p.shouldBuild(), p.content != "", p.BaseFileName())
|
||||
|
||||
require.Equal(t, p.shouldBuild(), p.Content != "", p.BaseFileName())
|
||||
require.Equal(t, p.shouldBuild(), p.content != "", p.BaseFileName())
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user