Skip to content

Commit f84a4f2

Browse files
committed
fix - table分割支持更多场景
- code删除单反引号匹配 - teds优化:安装apted
1 parent d782c16 commit f84a4f2

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ trafilatura
1111
https://github.com/opendatalab/magic-html/releases/download/magic_html-0.1.5-released/magic_html-0.1.5-py3-none-any.whl
1212
streamlit
1313
markdown
14-
jieba
14+
jieba
15+
apted

webmainbench/metrics/base.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,16 +294,12 @@ def is_md_separator_line(line):
294294
# 检查是否所有部分都是分隔符格式
295295
for p in parts:
296296
if p and not re.match(r"^:?\-{3,}:?$", p):
297-
298-
# if p and not re.match(r"^:?\-+(:?)$", p): # 调整正则为允许1个及以上短横线
299297
return False
300298
return True
301299

302300
def save_table():
303301
"""保存当前表格并清空缓存"""
304302
nonlocal table_lines
305-
# # 原逻辑要求至少2行且第2行是分隔行,改为只要有2行及以上且包含至少1个分隔行即可
306-
# if len(table_lines) >= 2 and any(is_md_separator_line(line) for line in table_lines):
307303
# 只有当表格行数大于等于2,且第二行是分隔行时才保存
308304
if len(table_lines) >= 2 and is_md_separator_line(table_lines[1]):
309305
md_table = '\n'.join(table_lines)

0 commit comments

Comments
 (0)