From 81188aed7f3923d510b8353bf2638663e97c577b Mon Sep 17 00:00:00 2001 From: Arron Mabrey Date: Wed, 12 Oct 2011 23:12:13 -0300 Subject: [PATCH] Skip partials prefixed with an underscore while still handling files prefixed with 2 consecutive underscores --- lib/middleman/builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/middleman/builder.rb b/lib/middleman/builder.rb index 3d095732..e8865679 100644 --- a/lib/middleman/builder.rb +++ b/lib/middleman/builder.rb @@ -111,8 +111,8 @@ module Middleman protected def handle_path(file_source) - # Skip partials prefixed with an underscore - return unless file_source.gsub(SHARED_SERVER.root, '').split('/').select { |p| p[0,1] == '_' }.empty? + # Skip partials prefixed with an underscore while still handling files prefixed with 2 consecutive underscores + return unless file_source.gsub(SHARED_SERVER.root, '').split('/').select { |p| p[/^_[^_]/] }.empty? file_extension = File.extname(file_source) file_destination = File.join(given_destination, file_source.gsub(source, '.'))