Module: Eraser::LineTerminators
- Defined in:
- lib/eraser/line_terminators.rb
Constant Summary collapse
- REGEX =
u000A Line Feed (‘n’) u000D Carriage Return (‘r’) u2028 Line separator u2029 Paragraph separator
/\r\n|[\n\r\u2028\u2029]/
Class Method Summary collapse
Class Method Details
.erase(value, replace_with = "\n") ⇒ Object
10 11 12 |
# File 'lib/eraser/line_terminators.rb', line 10 def self.erase(value, replace_with = "\n") value.gsub REGEX, replace_with end |