Actions
Bug #11464
closedERB trimming doesn't trim carriage returns
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
Backport:
Description
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
Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
- Status changed from Open to Assigned
- Assignee set to seki (Masatoshi Seki)
Updated by hsbt (Hiroshi SHIBATA) over 7 years ago
- Assignee changed from seki (Masatoshi Seki) to k0kubun (Takashi Kokubun)
- Target version set to 2.5
Updated by k0kubun (Takashi Kokubun) over 7 years ago
- Has duplicate Bug #5339: ERB generates extra newlines on Windows added
Updated by k0kubun (Takashi Kokubun) over 7 years ago
- Has duplicate deleted (Bug #5339: ERB generates extra newlines on Windows)
Updated by k0kubun (Takashi Kokubun) over 7 years ago
- Status changed from Assigned to Closed
Applied in changeset trunk|r58823.
erb.rb: Allow trimming carriage return
when trim_mode is "<>", for Windows environments.
[Bug #11464]
Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
Updated by usa (Usaku NAKAMURA) over 7 years ago
- 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.
Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago
- Backport changed from 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: DONE, 2.4: DONE
ruby_2_4 r59300 merged revision(s) 58823.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0