aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Rakefile2
1 files changed, 1 insertions, 1 deletions
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}"