Keats / tera

A template engine for Rust based on Jinja2/Django
http://keats.github.io/tera/
MIT License
3.36k stars 280 forks source link

error while importing #902

Closed FatSquare closed 3 months ago

j1mc commented 4 months ago

What is the error? Please provide additional detail. Thank you.

RedstoneParadox commented 4 months ago

I assume that this is the error they're getting

* Failed to parse "\\\\?\\C:\\Users\\<user>\\RustroverProjects\\hyper-text-stitcher\\test\\templates\\base.html"                                    
  --> 21:5                                                                                                                                         
   |                                                                                                                                               
21 |     {% import "macros.html" as macros %}                                                                                                      
   |     ^---                                                                                                                                      
   |                                                                                                                                               
   = unexpected tag; expected end of input, a macro definition tag (`{% macro my_macro() %}`, or some content     

Edit: If this is indeed the issue they are experiencing, it's worth noting that the error occurs when macro imports are anywhere other than the top of the file.