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

Fixed compile_jst function to support crlf on windows (thanx to jashkenas) #129

Merged
merged 1 commit into from
Mar 23, 2011

Conversation

fe9lix
Copy link
Contributor

@fe9lix fe9lix commented Feb 11, 2011

The compile_jst function now replaces crlf in (\r\n) in JST templates. This fixes an issue where the function would render line breaks within the template string on windows (resulting in invalid JS).

@nesizer
Copy link

nesizer commented Feb 13, 2011

i have just tested this on a windows 7 machine with a file saved with crlf endings and it works

@fe9lix
Copy link
Contributor Author

fe9lix commented Feb 13, 2011

You mean before or after the bugfix? ;) I'm also on Windows 7 and testing locally...it only works with this fix, i.e. after removing all crlfs. Otherwise, if you view the source in Firebug, you have all these line breaks in the template string which render the JavaScript invalid.

@nesizer
Copy link

nesizer commented Feb 13, 2011

After the bugfix.
Sorry for not being specific about that

@fe9lix
Copy link
Contributor Author

fe9lix commented Feb 13, 2011

Ok, cool, so I think they should pull it into master soon :)

@aaronchi
Copy link

+1 Took me forever to figure out what was going on

@jashkenas jashkenas merged commit e75f22f into documentcloud:master Mar 23, 2011
@jashkenas
Copy link
Member

Thanks for the fix -- it's merged to master, and will go out with the next release.

@ses4j
Copy link

ses4j commented Feb 24, 2014

I seem to be having Windows line-ending issues on Jammit 0.6.6, I can see double-line endings in Windows-style js my yui temporary merged file.

@ses4j
Copy link

ses4j commented Feb 24, 2014

Specifically, my input files have CRLF, and the temporary file that YUI is balking on trying to compress has CRCRLF in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants