```ruby
module EPUB
  module Search
    module Formatter
      class CLI
        def initialize(data, word, hilight=$stderr.tty?)
          @data, @word, @hilight = data, word, hilight
        end

        def format
          word_re = /#{Regexp.escape(@word)}/o
          hilighter = HighLine.Style(:red, :bold) if hilight?
          @data.each_pair do |location, records|
            records.each do |record|
              record.content.each_line do |line|
                next unless line =~ word_re
                result = line.chomp
                result.gsub! word_re, hilighter.color(@word) if hilight?
                result << "  [#{record.page_title}(#{record.book_title}): #{location} - #{record.iri}]"
                puts result
              end
            end
          end
        end

        def hilight?
          @hilight
        end
      end
    end
  end
end
```

Fix typos: hilight -> highlihgt
user
```ruby
module EPUB
  module Search
    module Formatter
      class CLI
        def initialize(data, word, highlight=$stderr.tty?)
          @data, @word, @highlight = data, word, highlight
        end

        def format
          word_re = /#{Regexp.escape(@word)}/o
          highlighter = HighLine.Style(:red, :bold) if highlight?
          @data.each_pair do |location, records|
            records.each do |record|
              record.content.each_line do |line|
                next unless line =~ word_re
                result = line.chomp
                result.gsub! word_re, highlighter.color(@word) if highlight?
                result << "  [#{record.page_title}(#{record.book_title}): #{location} - #{record.iri}]"
                puts result
              end
            end
          end
        end

        def highlight?
          @highlight
        end
      end
    end
  end
end
```
assistant