Class: PreformattedTextLineSplitFilter

Inherits:
HTML::Pipeline::Filter
  • Object
show all
Defined in:
lib/autoload/preformatted_text_line_split_filter.rb

Constant Summary collapse

NEWLINE_REGEX =

The regex for splitting input by newlines.

/\r\n|\r|\n/

Instance Method Summary collapse

Instance Method Details

#callObject

Adds a line number before the code block. Takes a :line_start option which specifies the start line number, default is 1.


8
9
10
11
12
13
14
# File 'lib/autoload/preformatted_text_line_split_filter.rb', line 8

def call
  doc.search('pre').each do |pre|
    process_pre_tag(pre)
  end

  doc
end