From c0f88cb080950879bc8af5cf498ac3aa8a8c68fb Mon Sep 17 00:00:00 2001 From: MkvAutoSubset Date: Sun, 17 Oct 2021 20:17:58 +0800 Subject: Bump to 3.1.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 增加C函数导出 - 增加python调用的demo --- lib/ass.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/ass.go') 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 -- cgit v1.2.1