Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters don't work on nested mixins #54

Open
pipe01 opened this issue Sep 8, 2023 · 2 comments
Open

Parameters don't work on nested mixins #54

pipe01 opened this issue Sep 8, 2023 · 2 comments

Comments

@pipe01
Copy link

pipe01 commented Sep 8, 2023

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.

@UnrealView
Copy link

I see the same problem and don't have a workaround at the moment.

@pipe01
Copy link
Author

pipe01 commented Oct 19, 2023

I ended up writing my own library lol, there's absolutely no documentation though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants