Class: Redmine::WikiFormatting::CommonMark::AppendSpacesToLines

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine/wiki_formatting/common_mark/append_spaces_to_lines.rb

Class Method Summary collapse

Class Method Details

.call(string) ⇒ Object



24
25
26
# File 'lib/redmine/wiki_formatting/common_mark/append_spaces_to_lines.rb', line 24

def self.call(string)
  string&.gsub(/(?<!  |\\)(\r?\n)/, "  \\1")
end