From cc1cfa56b200a93532fb392d96d85426fcc91f38 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 19 Jul 2011 17:29:23 -0400 Subject: fixed regular expression for new_page rake task --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 201286b7..e7095674 100644 --- a/Rakefile +++ b/Rakefile @@ -81,7 +81,7 @@ task :new_page, :filename do |t, args| require './plugins/titlecase.rb' args.with_defaults(:filename => 'new-page') page_dir = source_dir - if args.filename =~ /(^.+\/)?(\w+)(\.)?(.+)?/ + if args.filename =~ /(^.+\/)?([\w_-]+)(\.)?(.+)?/ page_dir += $4 ? "/#{$1}" : "/#{$1}#{$2}/" name = $4 ? $2 : "index" extension = $4 || "#{new_page_ext}" -- cgit v1.2.1