jade
jade copied to clipboard
Parameters don't work on nested mixins
For example:
mixin inner(foo)
div Foo is #{foo}
mixin outer
+inner("Bar")
+outer
Outputs this:
// Code generated by "jade.go"; DO NOT EDIT.
package views
import (
"io"
)
const (
index__0 = `<div>Foo is `
index__1 = `</div>`
)
func Jade_index(wr io.Writer) {
buffer := &WriterAsBuffer{wr}
{
{
buffer.WriteString(index__0)
WriteAll(foo, true, buffer)
buffer.WriteString(index__1)
}
}
}
As you can see, inner's foo parameter isn't resolved which results in an undefined reference.
I see the same problem and don't have a workaround at the moment.
I ended up writing my own library lol, there's absolutely no documentation though.