class Cucumber::Formatter::Pretty

def print_comments(up_to_line, indent_amount)

def print_comments(up_to_line, indent_amount)
  comments = gherkin_document.comments
  return if comments.empty? || comments.length <= @next_comment_to_be_printed
  comments[@next_comment_to_be_printed..].each do |comment|
    if comment.location.line <= up_to_line
      @io.puts(indent(format_string(comment.text.strip, :comment), indent_amount))
      @next_comment_to_be_printed += 1
    end
    break if @next_comment_to_be_printed >= comments.length
  end
end