Class: JayShortenIndent

Inherits:
HTML::Pipeline::TextFilter
  • Object
show all
Defined in:
lib/jay_flavored_markdown/markdown_converter.rb

Overview

Shorten 4 indent to 2 indent.

Instance Method Summary collapse

Instance Method Details

#callObject



880
881
882
883
884
# File 'lib/jay_flavored_markdown/markdown_converter.rb', line 880

def call
  @text = @text.split("\n").map do |line|
    shorten_indent(line)
  end.join("\n")
end