Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ChinaGodMan/UserScripts
/ replacer
Function
replacer
utils/helper.py:177–179 ·
view source on GitHub ↗
(match)
Source
from the content-addressed store, hash-verified
175
}
176
177
def
replacer(match):
178
key = match.group(1)
179
return
placeholders.get(key, match.group(0))
180
pattern = re.compile(r
'{([^}]+)}'
)
181
formatted_str = pattern.sub(replacer, input_str)
182
return
formatted_str
Callers
nothing calls this directly
Calls
1
get
Method · 0.80
Tested by
no test coverage detected