]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
markup/goldmark: Improve the raw HTML omitted warning
authorJoe Mooring <joe.mooring@veriphor.com>
Thu, 7 Nov 2024 20:19:59 +0000 (12:19 -0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 7 Nov 2024 21:00:09 +0000 (23:00 +0200)
Closes #13023

markup/goldmark/goldmark_integration_test.go
markup/goldmark/hugocontext/hugocontext.go

index 82579069bb2323234669ad4153a689e8e3088c26..17b76360db00b11d7f9d2b36f6b8fa78fa3448a1 100644 (file)
@@ -821,7 +821,7 @@ title: "p1"
        b := hugolib.Test(t, files, hugolib.TestOptWarn())
 
        b.AssertFileContent("public/p1/index.html", "<!-- raw HTML omitted -->")
-       b.AssertLogContains("WARN  Raw HTML omitted from \"/content/p1.md\"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")
+       b.AssertLogContains("WARN  Raw HTML omitted white rendering \"/content/p1.md\"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")
 
        b = hugolib.Test(t, strings.ReplaceAll(files, "markup.goldmark.renderer.unsafe = false", "markup.goldmark.renderer.unsafe = true"), hugolib.TestOptWarn())
        b.AssertFileContent("public/p1/index.html", "! <!-- raw HTML omitted -->")
@@ -845,7 +845,7 @@ title: "p1"
        b := hugolib.Test(t, files, hugolib.TestOptWarn())
 
        b.AssertFileContent("public/p1/index.html", "<!-- raw HTML omitted -->")
-       b.AssertLogContains("WARN  Raw HTML omitted from \"/content/p1.md\"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")
+       b.AssertLogContains("WARN  Raw HTML omitted white rendering \"/content/p1.md\"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")
 
        b = hugolib.Test(t, strings.ReplaceAll(files, "markup.goldmark.renderer.unsafe = false", "markup.goldmark.renderer.unsafe = true"), hugolib.TestOptWarn())
        b.AssertFileContent("public/p1/index.html", "! <!-- raw HTML omitted -->")
index a10e095efb984efb25742749fed709268b4da03f..4098392c497be52935b44c8d26e05cef85aba250 100644 (file)
@@ -157,7 +157,7 @@ func (r *hugoContextRenderer) stripHugoCtx(b []byte) ([]byte, bool) {
 }
 
 func (r *hugoContextRenderer) logRawHTMLEmittedWarn(w util.BufWriter) {
-       r.logger.Warnidf(constants.WarnGoldmarkRawHTML, "Raw HTML omitted from %q; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe", r.getPage(w))
+       r.logger.Warnidf(constants.WarnGoldmarkRawHTML, "Raw HTML omitted white rendering %q; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe", r.getPage(w))
 }
 
 func (r *hugoContextRenderer) getPage(w util.BufWriter) any {