Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Qinbf/groundmap
/ strip_anchors
Function
strip_anchors
scripts/postprocess.py:53–55 ·
view source on GitHub ↗
从文本中剥离所有由 add_anchors 添加的锚点尾巴,恢复原始内容。
(text: str)
Source
from the content-addressed store, hash-verified
51
52
53
def
strip_anchors(text: str) -> str:
54
""
"从文本中剥离所有由 add_anchors 添加的锚点尾巴,恢复原始内容。"
""
55
return
ANCHOR_STRIP_RE.sub(
""
, text)
56
57
58
def
_normalize_for_hash(s: str) -> str:
Callers
2
test_strip_anchors_inverse
Method · 0.90
add_anchors
Function · 0.85
Calls
no outgoing calls
Tested by
1
test_strip_anchors_inverse
Method · 0.72