Browse Source

eng prototype

ming 3 years ago
parent
commit
d7fad9c0ee
1 changed files with 2 additions and 1 deletions
  1. 2 1
      OpenshotService/openshot_video_generator.py

+ 2 - 1
OpenshotService/openshot_video_generator.py

@@ -212,7 +212,8 @@ def call_anchor(fileName,avatar):
 def trim_punctuation(s):
     pat_block = u'[^\u4e00-\u9fff0-9a-zA-Z]+';
     pattern = u'([0-9]+{0}[0-9]+)|{0}'.format(pat_block)
-    res = re.sub(pattern, lambda x: x.group(1) if x.group(1) else u"" ,s)
+    pattern.pop(' ')
+    res = re.sub(pattern, lambda x: x.group(1) if x.group(1) else u" " ,s)
     return res
 
 def splitter(s):