Browse code

fixed regular expression for new_page rake task

Brandon Mathis authored on 19/07/2011 at 21:29:23
Showing 1 changed files
... ...
@@ -81,7 +81,7 @@ task :new_page, :filename do |t, args|
81 81
   require './plugins/titlecase.rb'
82 82
   args.with_defaults(:filename => 'new-page')
83 83
   page_dir = source_dir
84
-  if args.filename =~ /(^.+\/)?(\w+)(\.)?(.+)?/
84
+  if args.filename =~ /(^.+\/)?([\w_-]+)(\.)?(.+)?/
85 85
     page_dir += $4 ? "/#{$1}" : "/#{$1}#{$2}/"
86 86
     name = $4 ? $2 : "index"
87 87
     extension = $4 || "#{new_page_ext}"