summaryrefslogtreecommitdiff
path: root/utils.go
diff options
context:
space:
mode:
authorKurenai <[email protected]>2021-10-15 19:07:50 +0800
committerKurenai <[email protected]>2021-10-15 19:07:50 +0800
commit41568b669ab6bf44e01c7b95584a03a9ce7de8eb (patch)
treeec5f13910655ee3b8fd34cc66ef1732c58b1f128 /utils.go
parent2e0da3d465152e44f06d06f128875728c7deaf81 (diff)
重写了用于替换ass文件里字体的正则表达式,修复以前输出成品字幕不工作的问题,以及修复@前缀的字体名匹配不了的问题
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/utils.go b/utils.go
index d274a60..ff91308 100644
--- a/utils.go
+++ b/utils.go
@@ -209,12 +209,6 @@ func randomNumber(min, max int) int {
return min + randomN(sub)
}
-var reg, _ = regexp.Compile(`[\*\.\?\+\$\^\[\]\(\)\{\}\|\\\/]`)
-
-func regEx(str string) string {
- return reg.ReplaceAllString(str, `\$0`)
-}
-
func findFonts(dir string) []string {
list, _ := findPath(dir, `\.((ttf)|(otf)|(ttc)|(fon))$`)
return list