MCPcopy Create free account
hub / github.com/Qinbf/groundmap / _strip_anchor_from_text

Function _strip_anchor_from_text

scripts/section_parser.py:217–219  ·  view source on GitHub ↗

去掉文本末尾的 `^x-...` 锚点(用于生成 preview / 重生成时识别原标题)。

(s: str)

Source from the content-addressed store, hash-verified

215
216
217def _strip_anchor_from_text(s: str) -> str:
218 """去掉文本末尾的 `^x-...` 锚点(用于生成 preview / 重生成时识别原标题)。"""
219 return ANCHOR_TAIL_RE.sub("", s).rstrip()
220
221
222def _clean_preview(text: str) -> str:

Callers 1

_clean_previewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected