class Asciidoctor::Reader

def skip_blank_lines

been consumed (even if lines were skipped by this method).
Returns the [Integer] number of lines skipped or nothing if all lines have

=> ["Foo", "Bar", ""]
reader.lines
=> 2
reader.skip_blank_lines
=> ["", "", "Foo", "Bar", ""]
reader.lines

Examples

Public: Skip blank lines at the cursor.
def skip_blank_lines
  return if empty?
  num_skipped = 0
  # optimized code for shortest execution path
  while (next_line = peek_line)
    if next_line.empty?
      shift
      num_skipped += 1
    else
      return num_skipped
    end
  end
end