瀏覽代碼

Merge pull request #163 from qor5/fix-reg

Fix pb path regex to support `-`
Chenyang 1 年之前
父節點
當前提交
138a602bb6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pagebuilder/helper.go

+ 1 - 1
pagebuilder/helper.go

@@ -10,7 +10,7 @@ import (
 )
 
 var (
-	directoryRe = regexp.MustCompile(`^([\/]{1}[a-z0-9.]+)+(\/?){1}$|^([\/]{1})$`)
+	directoryRe = regexp.MustCompile(`^([\/]{1}[a-z0-9.-]+)+(\/?){1}$|^([\/]{1})$`)
 )
 
 const (