修改剪贴板表格生成工具中的一个bug

This commit is contained in:
weiye.wang 2023-04-22 19:49:17 +08:00
parent cfc9fd4e65
commit 659ee6814d
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ for c in data:
data1 += c
data = data1
data = data.replace("",".").replace("",":")
elements = data.split("\n")
elements_per_line = int(elements.pop(-1)) #这里需要修改
elements = [l for l in data.split("\n") if len(l)>0]
elements_per_line = int(elements.pop(0)) #这里需要修改
contents = "\\begin{center}\n\\begin{tabular}{|"
for i in range(elements_per_line):
contents += "c|"