Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
No escaping of mako directives, cannot easily put a percent sign in my document at the beggining of a line #112
Migrated issue, originally created by Anonymous
I am using mako to render a TeX doc and have found it rather distirbing that I was not able to figure out how to easily put a % sign (comment in TeX) as the first charachter (after any white space) in a line. The reason of course is mako thinks of it as a directive.
Looked through the documentation and did not find a way to escape the percent sign. So if a solution exists there is at least a bug in the documentation.
I found this to have to many characters where my purpose is to output a comment, so it is not really worth it.
PS. I am a Mako user, but I did try Jinja2 for this to start (just to get a feel for it) and it failed miserably, as opposed to Mako which only complained about the TeX comments. From now on Mako is my first choice.
umeboshi2 (@umeboshi2) wrote:
The <%text> tag is somewhat buried in the documentation with respect to somebody who is trying to quickly look up how to keep mako from parsing the parts of my template that I want to be taken literally. It would be nice if there was a small reference section that briefly listed some of this. I found this issue by googling
Michael Bayer (@zzzeek) wrote:
it is two clicks, minimal scrolling. Click on "Documentation" at http://www.makotemplates.org/, then click on http://docs.makotemplates.org/en/latest/syntax.html#tags. It is the eighth link in the second section of the documentation, "Syntax". This section, "Syntax", includes the total of Mako syntax, and the "Tags" section, described as "a quick summary of all the tags:", lists out each tag with a short description with links to further details for each tag.
From everything I can see this looks a lot like a "small reference section that listed out tags" and it's linked from the top page of the documentation.