summaryrefslogtreecommitdiff
path: root/lib/ass.go
diff options
context:
space:
mode:
authorMkvAutoSubset <[email protected]>2021-10-17 20:17:58 +0800
committerKurenai <[email protected]>2021-10-17 20:17:58 +0800
commitc0f88cb080950879bc8af5cf498ac3aa8a8c68fb (patch)
treecaa193ee7f100a1b22d5fa7fa8dfe1120f7ae757 /lib/ass.go
parent70a7c4edba281122c05ef46e9efffe5309ef8448 (diff)
Bump to 3.1.3
- 增加C函数导出 - 增加python调用的demo
Diffstat (limited to 'lib/ass.go')
-rw-r--r--lib/ass.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ass.go b/lib/ass.go
index d1c114c..7482ac8 100644
--- a/lib/ass.go
+++ b/lib/ass.go
@@ -103,14 +103,14 @@ func (self *assProcessor) parse() bool {
str += string(_k)
}
str = strings.TrimSpace(str)
- str = reg.ReplaceAllString(str, "")
- str += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
- reg, _ = regexp.Compile("[1234567890]")
- if reg.MatchString(str) {
- str = reg.ReplaceAllString(str, "")
- str += "1234567890"
- }
if str != "" {
+ str = reg.ReplaceAllString(str, "")
+ str += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+ reg, _ = regexp.Compile("[1234567890]")
+ if reg.MatchString(str) {
+ str = reg.ReplaceAllString(str, "")
+ str += "1234567890"
+ }
self.m[k] = new(fontInfo)
self.m[k].str = str
self.m[k].oldName = k