|
|
@ -423,6 +423,7 @@ def cut1(inp):
|
|
|
|
def cut2(inp):
|
|
|
|
def cut2(inp):
|
|
|
|
inp = inp.strip("\n")
|
|
|
|
inp = inp.strip("\n")
|
|
|
|
inps = split(inp)
|
|
|
|
inps = split(inp)
|
|
|
|
|
|
|
|
# print(inps)
|
|
|
|
if len(inps) < 2:
|
|
|
|
if len(inps) < 2:
|
|
|
|
return inp
|
|
|
|
return inp
|
|
|
|
opts = []
|
|
|
|
opts = []
|
|
|
@ -437,7 +438,8 @@ def cut2(inp):
|
|
|
|
tmp_str = ""
|
|
|
|
tmp_str = ""
|
|
|
|
if tmp_str != "":
|
|
|
|
if tmp_str != "":
|
|
|
|
opts.append(tmp_str)
|
|
|
|
opts.append(tmp_str)
|
|
|
|
if len(opts[-1]) < 50: ##如果最后一个太短了,和前一个合一起
|
|
|
|
# print(opts)
|
|
|
|
|
|
|
|
if len(opts)>1 and len(opts[-1]) < 50: ##如果最后一个太短了,和前一个合一起
|
|
|
|
opts[-2] = opts[-2] + opts[-1]
|
|
|
|
opts[-2] = opts[-2] + opts[-1]
|
|
|
|
opts = opts[:-1]
|
|
|
|
opts = opts[:-1]
|
|
|
|
return "\n".join(opts)
|
|
|
|
return "\n".join(opts)
|
|
|
|