From e169f88a5a0bdab95b20491047747c2cc46dab30 Mon Sep 17 00:00:00 2001 From: Artem Baguinski Date: Fri, 22 Mar 2013 18:22:16 +0100 Subject: [PATCH] fix 'needs_to_reload?' regexps - remove stray ^ that would cause regexp to never match - remove '_helper' suffix as it isn't required for helpers --- middleman-core/lib/middleman-core/preview_server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleman-core/lib/middleman-core/preview_server.rb b/middleman-core/lib/middleman-core/preview_server.rb index c2506c17..b9f659ec 100644 --- a/middleman-core/lib/middleman-core/preview_server.rb +++ b/middleman-core/lib/middleman-core/preview_server.rb @@ -189,8 +189,8 @@ module Middleman def needs_to_reload?(paths) match_against = [ %r{^config\.rb}, - %r{^lib/^[^\.](.*)\.rb$}, - %r{^helpers/^[^\.](.*)_helper\.rb$} + %r{^lib/[^\.](.*)\.rb$}, + %r{^helpers/[^\.](.*)\.rb$} ] if @options[:reload_paths]