class MarkdownExec::SearchResultsReport

def file_contents(search_options, highlight_value)

def file_contents(search_options, highlight_value)
  matched_contents = find_file_contents.map.with_index do |(file, contents), index|
    [file, contents.map { |detail| format('=%4.d: %s', detail.index, detail.line) }, index]
  end
  {
    section_title: 'file contents',
    data: matched_contents.map(&:first),
    formatted_text: matched_contents.map do |(file, details, index)|
            { header: format('- %3.d: %s', index + 1, file),
              content: AnsiFormatter.new(search_options).format_and_highlight_array(
                details,
                highlight: [highlight_value]
              ) }
          end
  }
end