MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / absolutize_links

Function absolutize_links

scripts/website/syndicate_blog_posts.py:264–267  ·  view source on GitHub ↗
(body: str)

Source from the content-addressed store, hash-verified

262
263
264def absolutize_links(body: str) -> str:
265 body = _RELATIVE_LINK_RE.sub(lambda m: f"{m.group(1)}{SITE_BASE_URL}{m.group(2)}{m.group(3)}", body)
266 body = _RELATIVE_IMG_RE.sub(lambda m: f"{m.group(1)}{SITE_BASE_URL}{m.group(2)}{m.group(3)}", body)
267 return body
268
269
270def insert_blurb(body: str, blurb: str) -> str:

Callers 1

render_syndicated_bodyFunction · 0.85

Calls 2

groupMethod · 0.65
subMethod · 0.45

Tested by

no test coverage detected