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

Function _blank

scripts/k.py:154–156  ·  view source on GitHub ↗
(m: re.Match)

Source from the content-addressed store, hash-verified

152 """把 markdown 代码(围栏 + 行内)替换成等长空白,保留字符偏移与行号;
153 用于扫描标签 / 链接时跳过代码内字面提及。"""
154 def _blank(m: re.Match) -> str:
155 # 保留换行(围栏代码块多行),其余字符替换为空格——保证 len 不变
156 return "".join("\n" if ch == "\n" else " " for ch in m.group(0))
157 text = FENCED_CODE_RE.sub(_blank, text)
158 text = INLINE_CODE_RE.sub(_blank, text)
159 return text

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected