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

Control structure parsing fails on DOS/Windows carriage returns. #16

Closed
sqlalchemy-bot opened this issue Jan 23, 2007 · 3 comments
Closed
Labels
bug Something isn't working lexer low priority

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Anonymous

Taken from the docs (with Windows/DOS end-of-line formatting):

% if x==5:\r\n
    this is some output\r\n
% endif\r\n

This causes an exception in the templating engine. However, UNIX style end-of-lines (newline without a carriage return) work fine:

% if x==5:\n
    this is some output\n
% endif\n

I discovered this problem when creating the template on my Windows workstation and then SFTPing it to the server. My editor allows me to strip out the CRs when saving, but simplier Windows-based editors (like Notepad) won't be able to do this.

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed assignee from "zzzzeek" to "zzzeek"

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

should be fixed including a basic unit test in [changeset:200]. let me know if more complex templates have issues.

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

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