mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
@@ -149,9 +149,11 @@ func TestNestedNamedMissingParam(t *testing.T) {
|
|||||||
tem := tpl.New()
|
tem := tpl.New()
|
||||||
tem.AddInternalShortcode("acc.html", `<div class="acc">{{ .Inner }}</div>`)
|
tem.AddInternalShortcode("acc.html", `<div class="acc">{{ .Inner }}</div>`)
|
||||||
tem.AddInternalShortcode("div.html", `<div {{with .Get "class"}} class="{{ . }}"{{ end }}>{{ .Inner }}</div>`)
|
tem.AddInternalShortcode("div.html", `<div {{with .Get "class"}} class="{{ . }}"{{ end }}>{{ .Inner }}</div>`)
|
||||||
|
tem.AddInternalShortcode("div2.html", `<div {{with .Get 0}} class="{{ . }}"{{ end }}>{{ .Inner }}</div>`)
|
||||||
|
|
||||||
CheckShortCodeMatch(t,
|
CheckShortCodeMatch(t,
|
||||||
`{{% acc %}}{{% div %}}{{% /div %}}{{% /acc %}}`,
|
`{{% acc %}}{{% div %}}d1{{% /div %}}{{% div2 %}}d2{{% /div2 %}}{{% /acc %}}`,
|
||||||
"<div class=\"acc\"><div ></div>\n</div>", tem)
|
"<div class=\"acc1\"><div></div>\n</div>", tem)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIsNamedParamsSC(t *testing.T) {
|
func TestIsNamedParamsSC(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user