aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/content_render_hooks_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-07-15 08:46:54 +0200
committerBjørn Erik Pedersen <[email protected]>2021-07-15 10:14:52 +0200
commitee3d2bb1d3974584f47cde7c973fbd1ae1f512b6 (patch)
tree6ce5324b0e5f935cd1834c514495c3eb7cc5dc60 /hugolib/content_render_hooks_test.go
parenteb2a500367780b07d67c301ce7c866e6b67aa687 (diff)
downloadhugo-ee3d2bb1d3974584f47cde7c973fbd1ae1f512b6.tar.gz
hugo-ee3d2bb1d3974584f47cde7c973fbd1ae1f512b6.zip
markup/goldmark: Support auto links in render hook
Fixes #8755
Diffstat (limited to 'hugolib/content_render_hooks_test.go')
-rw-r--r--hugolib/content_render_hooks_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/hugolib/content_render_hooks_test.go b/hugolib/content_render_hooks_test.go
index 1d7a4f8e3..f1c27d511 100644
--- a/hugolib/content_render_hooks_test.go
+++ b/hugolib/content_render_hooks_test.go
@@ -56,7 +56,6 @@ title: P1
b.AssertFileContent("public/p1/index.html", `Link First Link|PARTIAL1_EDITED PARTIAL2_EDITEDEND`)
}
-
func TestRenderHooks(t *testing.T) {
config := `
baseURL="https://example.org"
@@ -110,6 +109,10 @@ title: Cool Page
---
[First Link](https://www.google.com "Google's Homepage")
+<https://foo.bar/>
+https://bar.baz/
{{< myshortcode3 >}}
@@ -209,7 +212,11 @@ title: No Template
b.Assert(int(counters.contentRenderCounter), qt.Equals, 45)
b.AssertFileContent("public/blog/p1/index.html", `
-<p>Cool Page|https://www.google.com|Title: Google's Homepage|Text: First Link|END</p>
+Cool Page|https://www.google.com|Title: Google's Homepage|Text: First Link|END
+Cool Page|https://foo.bar/|Title: |Text: https://foo.bar/|END
+Cool Page|https://bar.baz/|Title: |Text: https://bar.baz/|END
+Cool Page|mailto:[email protected]|Title: |Text: [email protected]|END
+Cool Page|mailto:[email protected]|Title: |Text: mailto:[email protected]|END
Text: Second
SHORT3|
<p>IMAGE: Cool Page||/images/Dragster.jpg|Title: image title|Text: Drag Racing|END</p>