summaryrefslogtreecommitdiff
path: root/lib/ass.go
diff options
context:
space:
mode:
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