Skip to content
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

No escaping of mako directives, cannot easily put a percent sign in my document at the beggining of a line #112

Closed
sqlalchemy-bot opened this issue Jun 3, 2009 · 7 comments
Labels
bug Something isn't working lexer low priority
Milestone

Comments

@sqlalchemy-bot
Copy link

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.

My Solution is to use ${'%'}

I found this to have to many characters where my purpose is to output a comment, so it is not really worth it.

-- Hatem

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.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

you can also use <%text>.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

consider adding %% for this

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • set milestone to "0.3"

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

implemented as %% in 2bc0ea9.

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Author

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 escaping mako directives.

@sqlalchemy-bot
Copy link
Author

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.

@sqlalchemy-bot sqlalchemy-bot added bug Something isn't working low priority lexer labels Nov 26, 2018
@sqlalchemy-bot sqlalchemy-bot added this to the 0.3 milestone Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lexer low priority
Projects
None yet
Development

No branches or pull requests

1 participant