Issue #11464 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED

ruby_2_3 r59225 merged revision(s) 58823.

----------------------------------------
Bug #11464: ERB trimming doesn't trim carriage returns
https://bugs.ruby-lang.org/issues/11464#change-65579

* Author: Larivact (Martin Fischer)
* Status: Closed
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 2.5
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
* Backport: 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED
----------------------------------------
ERB trimming doesn't work if the .erb file was written on Windows (because Windows uses \r\n as line ending, whereas Linux uses only \n)
The implementation apparently only trims \n

~~~
ruby erbCarriageReturnBug.rb
~~~

Expected output:

~~~
<ul>
        <li>cucumber</li>
        <li>cucumber</li>
        <li>cucumber</li>
</ul>
~~~

Received output:

~~~
<ul>

        <li>cucumber</li>

        <li>cucumber</li>

        <li>cucumber</li>

</ul>
~~~

Corresponding documentation: http://ruby-doc.org/stdlib-2.2.2/libdoc/erb/rdoc/ERB.html

---Files--------------------------------
example.erb (59 Bytes)
erbCarriageReturnBug.rb (73 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>