lib/markdo/query_command.rb in markdo-0.1.1 vs lib/markdo/query_command.rb in markdo-0.1.2

- old
+ new

@@ -1,15 +1,14 @@ -#encoding: utf-8 require 'markdo/command' module Markdo class QueryCommand < Command def run(string) regexp = Regexp.new(string, Regexp::IGNORECASE) matches = Dir. glob(markdown_glob). - map { |path| File.readlines(path) }. + map { |path| File.readlines(path, encoding: 'UTF-8') }. flatten. grep(regexp) @stdout.puts(matches) end