Commit 4e76093f by wangzhiyang Committed by 胡悦

fix(会议纪要导出脚本): 修复链接内容前后反引号未被去除的问题

完善_wrap_link函数的链接处理逻辑,移除链接内容前后的反引号后再生成链接标签
1 parent d3b52b84
......@@ -32,9 +32,16 @@ OSS_DIR_PREFIX = "meeting-minutes"
def _wrap_link(url: str) -> str:
cleaned = url.replace("\r", "").replace("\n", "").strip()
if cleaned.startswith("<link>") and cleaned.endswith("</link>"):
return cleaned
return f"<link>{cleaned}</link>"
inner = cleaned[len("<link>"):-len("</link>")].strip()
else:
inner = cleaned
if inner.startswith("`") and inner.endswith("`") and len(inner) >= 2:
inner = inner[1:-1].strip()
return f"<link>{inner}</link>"
# ────────────────────── OSS 上传 ──────────────────────
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!