Fix searching for page titles.
This commit is contained in:
+2
-1
@@ -487,7 +487,8 @@ module Gollum
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Use git ls-files '*query*' to search for file names. Grep only searches file content.
|
# Use git ls-files '*query*' to search for file names. Grep only searches file content.
|
||||||
@repo.git.ls_files({}, "*#{ query }*").split("\n").each do |line|
|
# Spaces are converted to dashes when saving pages to disk.
|
||||||
|
@repo.git.ls_files({}, "*#{ query.gsub(' ', '-') }*").split("\n").each do |line|
|
||||||
file_name = line.chomp(::File.extname(line))
|
file_name = line.chomp(::File.extname(line))
|
||||||
# If there's not already a result for file_name then
|
# If there's not already a result for file_name then
|
||||||
# the value is nil and nil.to_i is 0.
|
# the value is nil and nil.to_i is 0.
|
||||||
|
|||||||
Reference in New Issue
Block a user