summaryrefslogtreecommitdiffstats
path: root/markup/goldmark/images/integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/goldmark/images/integration_test.go')
-rw-r--r--markup/goldmark/images/integration_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/markup/goldmark/images/integration_test.go b/markup/goldmark/images/integration_test.go
index e8d1b880e..8b0ba99c1 100644
--- a/markup/goldmark/images/integration_test.go
+++ b/markup/goldmark/images/integration_test.go
@@ -39,10 +39,10 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
files = files + `-- layouts/_default/_markup/render-image.html --
{{ if .IsBlock }}
<figure class="{{ .Attributes.class }}">
- <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
+ <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}|{{ .Ordinal }}" />
</figure>
{{ else }}
- <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
+ <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}|{{ .Ordinal }}" />
{{ end }}
`
b := hugolib.NewIntegrationTestBuilder(
@@ -54,8 +54,8 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
).Build()
b.AssertFileContent("public/p1/index.html",
- "This is an inline image: \n\t<img src=\"/inline.jpg\" alt=\"Inline Image\" />\n. Some more text.</p>",
- "<figure class=\"b\">\n\t<img src=\"/block.jpg\" alt=\"Block Image\" />",
+ "This is an inline image: \n\t<img src=\"/inline.jpg\" alt=\"Inline Image|0\" />\n. Some more text.</p>",
+ "<figure class=\"b\">\n\t<img src=\"/block.jpg\" alt=\"Block Image|1\" />",
)
})
@@ -109,5 +109,4 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
b.AssertFileContent("public/p1/index.html", "<p class=\"b\"><img src=\"/block.jpg\" alt=\"Block Image\"></p>")
})
-
}