Merge pull request #1180 from bogado/issue#1179

Fix page list for files that have regexp special chars.
This commit is contained in:
Dawa Ometto
2017-03-09 16:22:40 +01:00
committed by GitHub
+2 -1
View File
@@ -36,7 +36,8 @@ module Precious
# 1012: Folders and Pages need to be separated
@results.each do |page|
page_path = page.path.sub(/^#{@path}\//, '')
page_path = page.path
page_path = page_path.sub(/^#{Regexp.escape(@path)}\//, '') unless @path.nil?
if page_path.include?('/')
folder = page_path.split('/').first