Skip to content

Commit e178cfe

Browse files
Merge branch 'main' of https://github.com/maxkb-dev/maxkb
2 parents 125ed8a + 3b24373 commit e178cfe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/common/handle/impl/table/xls_parse_table_handle.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def get_content(self, file, save_image):
8282
for row in data:
8383
# 将每个单元格中的内容替换换行符为 <br> 以保留原始格式
8484
md_table += '| ' + ' | '.join(
85-
[str(cell).replace('\n', '<br>') if cell else '' for cell in row]) + ' |\n'
85+
[str(cell)
86+
.replace('\r\n', '<br>')
87+
.replace('\n', '<br>')
88+
if cell else '' for cell in row]) + ' |\n'
8689
md_tables += md_table + '\n\n'
8790

8891
return md_tables

0 commit comments

Comments
 (0)