... | ... |
@@ -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}" |