mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-11-04 16:35:08 -05:00
fixed regular expression for new_page rake task
This commit is contained in:
parent
3f2855ac6b
commit
cc1cfa56b2
2
Rakefile
2
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}"
|
||||
|
Loading…
Reference in New Issue
Block a user