@@ -53,7 +53,7 @@ listen_port = _cfg.get("listen_port", 8080)
|
|||||||
project_name = _cfg.get("project_name", "MoneyPrinterTurbo")
|
project_name = _cfg.get("project_name", "MoneyPrinterTurbo")
|
||||||
project_description = _cfg.get("project_description",
|
project_description = _cfg.get("project_description",
|
||||||
"<a href='https://github.com/harry0703/MoneyPrinterTurbo'>https://github.com/harry0703/MoneyPrinterTurbo</a>")
|
"<a href='https://github.com/harry0703/MoneyPrinterTurbo'>https://github.com/harry0703/MoneyPrinterTurbo</a>")
|
||||||
project_version = _cfg.get("project_version", "1.1.0")
|
project_version = _cfg.get("project_version", "1.1.1")
|
||||||
reload_debug = False
|
reload_debug = False
|
||||||
|
|
||||||
imagemagick_path = app.get("imagemagick_path", "")
|
imagemagick_path = app.get("imagemagick_path", "")
|
||||||
|
|||||||
@@ -163,12 +163,27 @@ def str_contains_punctuation(word):
|
|||||||
def split_string_by_punctuations(s):
|
def split_string_by_punctuations(s):
|
||||||
result = []
|
result = []
|
||||||
txt = ""
|
txt = ""
|
||||||
for char in s:
|
|
||||||
|
previous_char = ""
|
||||||
|
next_char = ""
|
||||||
|
for i in range(len(s)):
|
||||||
|
char = s[i]
|
||||||
|
if i > 0:
|
||||||
|
previous_char = s[i - 1]
|
||||||
|
if i < len(s) - 1:
|
||||||
|
next_char = s[i + 1]
|
||||||
|
|
||||||
|
if char == "." and previous_char.isdigit() and next_char.isdigit():
|
||||||
|
# 取现1万,按2.5%收取手续费, 2.5 中的 . 不能作为换行标记
|
||||||
|
txt += char
|
||||||
|
continue
|
||||||
|
|
||||||
if char not in const.PUNCTUATIONS:
|
if char not in const.PUNCTUATIONS:
|
||||||
txt += char
|
txt += char
|
||||||
else:
|
else:
|
||||||
result.append(txt.strip())
|
result.append(txt.strip())
|
||||||
txt = ""
|
txt = ""
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user