forked from hoisie/mustache
-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
Test:
func TestMustacheRenderPartials(t *testing.T) {
expected := "header\n\n\tline 1\n\tline 2\n\nfooter\n"
staticProvider := &mustache.StaticProvider{
Partials: map[string]string{
"body": strings.Join([]string{
"\tline 1",
"\tline 2",
}, "\n"),
},
}
actual, err := mustache.RenderPartials(
"header\n\n{{> body}}\n\nfooter\n",
staticProvider,
map[string]string{},
)
assert.NoError(t, err)
assert.Equal(t, expected, actual)
}
I'm expecting there to be two newlines after replacing {{> body}} in the template but there's only one newline after that replacement.
Metadata
Metadata
Assignees
Labels
No labels