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.



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

def initialize(body)
  @body = body
end

Instance Method Details

#runObject

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



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

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