Class: Caramelize::RemoveTableTabLineEndings

Inherits:
Object
  • Object
show all
Defined in:
lib/caramelize/filters/remove_table_tab_line_endings.rb

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ RemoveTableTabLineEndings

Returns a new instance of RemoveTableTabLineEndings.



4
5
6
# File 'lib/caramelize/filters/remove_table_tab_line_endings.rb', line 4

def initialize(body)
  @body = body
end

Instance Method Details

#runObject

take an input stream and convert all wikka syntax to markdown syntax



9
10
11
12
13
# File 'lib/caramelize/filters/remove_table_tab_line_endings.rb', line 9

def run
  migrated_body = @body.dup
  migrated_body.gsub!(/\|[\t ]*\r?[\n]/, "|\n")
  migrated_body
end