-
Notifications
You must be signed in to change notification settings - Fork 282
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
Unreachable reached #370
Comments
So it is trying to render an Do you have any memories on the kind of templates that was causing the issue? The parser should not allow |
Oh interesting, yes that makes sense. I am converting a site that uses |
@focusaurus did you manage to reproduce it? |
Presumably it was something related to |
Yes, definitely related to an extends like that. The issue is that the parser probably allows it at a place it shouldn't be allowed. |
I'm getting an issue similar to this
|
Ah sorry to have bothered you. I believe the issue is in this little sentence: "Macros currently need to be defined in a separate file and imported to be useable." |
that's still a panic that should be fixed! Thanks for the report |
I added a failing test for that @sbstp on the v1 branch. |
Are macros limited to being in a standalone file because of some technical reason? |
I don't remember exactly, I think that the issue with being in the same file is that the file was usually to be rendered so the macro could have been defined in a forloop or something similar and it currently only checks the top level of a template for macro definitions. It could be allowed by searching recursively in the AST but now I kind of like macros being separated from actual templates. |
Thank you for the fix! 👍 |
From getzola/zola#558
The text was updated successfully, but these errors were encountered: