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
Trying to use static-tag with call() macro #94
Comments
Can you create repo with a bug please? |
I've tried to reproduce this issue, but got a bit different error with latest loader version from master. Will try to dig it more. |
Which version of plugin and webpack you have @pkyeck ? |
As a temporary solution i suggest to export image to variable, and use it in your macros. <!-- index.njk -->
{% from "_imagefullwidth.njk" import ImageFullWidth with context %}
{% static 'images/maps-example.png' as image %}
{% call ImageFullWidth() %}
<img src="{{ image }}" alt="maps" />
{% endcall %} |
I can't reproduce your exact error, but found quite strange behaviour in nunjucks itself, that probably relate to your problem. I have dig a bit nunjucks parser. It seems that it is parse I'm not sure that custom async extensions could be properly used inside |
No response. Fell free to reopen this issue, if you still got a problems. |
I have dig this issue a bit. It looks like a nunjucks bug here (mozilla/nunjucks#1357). When nunjucks parse macro output, it "lift" filters from this output, and for some reason here is the conditional, that trying to treat async extensions (like built-in |
Describe the bug
I have a macro that is supposed to display an image.
Because I don't want to use dynamic assets, I thought that I pass in the
<img>
tag using the static-tag viacall()
.This works for "normal" html-code like
<p>test</p>
without a problem.But using the static-tag throws an error.
Expected behavior
I thought this would work ...
Do you have an idea why it is not working? Or what I could do to fix it?
The text was updated successfully, but these errors were encountered: