aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-19 17:29:23 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-19 17:29:23 -0400
commitcc1cfa56b200a93532fb392d96d85426fcc91f38 (patch)
tree6820663022ca3b1d44848523a13d770d4347ff67 /Rakefile
parent3f2855ac6ba9f623092e6658e4d465a425456c16 (diff)
downloadmy_new_personal_website-cc1cfa56b200a93532fb392d96d85426fcc91f38.tar.xz
my_new_personal_website-cc1cfa56b200a93532fb392d96d85426fcc91f38.zip
fixed regular expression for new_page rake task
Diffstat (limited to 'Rakefile')
-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}"