Commit 051bcc83 by wangzhiyang Committed by 胡悦

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

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