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

ERB with Windows EOL characters --> blank lines #37

Open
ghost opened this issue Feb 14, 2012 · 0 comments
Open

ERB with Windows EOL characters --> blank lines #37

ghost opened this issue Feb 14, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 14, 2012

Seen with Stasis 0.1.16 on Windows 7 64-Bit, Ruby 1.9.3-p0, latest Gem's as published at the time of report.

When using ERB layouts with Windows-style end-of-line (EOL) characters (i.e. CRLF) , the resulting output file has a double newline after each EOL. When using Unix-style or Mac-style EOL all is fine.

As an example, using an ERB template looking like this:

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
</head>
<body>
<%= yield %>
</body>
</html>

I get an output file looking like this:

<!DOCTYPE html>

<html>

<head>

    <title>Test</title>

</head>

<body>

<h1>Header 1</h1>
<p>This is a paragraph.</p>

</body>

</html>

The character sequence at the end of each output line is: CRCRLF

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

No branches or pull requests

0 participants