Closed Asday closed 1 month ago
well it's not "incorrect" it's just not providing context that's as helpful as that of other parsers.
Mako is very much a legacy library and this parser was ported from another parser written in Perl about 25 years ago at this point, and as such it has limited ability to provide better information than this. If you're starting a new project I would recommend a much more mature template language like Jinja.
Unforch. I'm not starting a new project, rather a new job, so I don't get to make those decisions.
Thank you for your time.
I'm not opposed to improvements it's just I dont personally have resources to rearchitect Mako's parser here.
Yeah no 100% I get you, the "unforch" was a "woe is me", and the "thank you for your time" was genuine.
I am new to Mako templates, and making the usual rookie errors.
I'm coming from Django templates, where
{% extends "base.html" %}
and{% block blockname %}
require no extra decoration, so I have several times done<% inherit "base.html" />
and<%block "content" />
, both of which appear to pick an arbitrary=
hundreds of lines of template code later and claim the problem is there, e.g.:This is, in my opinion, an incorrect error message. That is explaining why the state machine failed to halt successfully, but that's not useful to the user, who instead cares why the state machine is in that state in the first place.
I'm not able to suggest fixes without spending a lot more time on this, but something like "expected
%>
in file ... at ..., while parsing<%inherit
at ..." would be good, then I'd at least have know which tags were causing the issue rather than having to binary search delete chunks of my file to figure out where the issue really is.