MCPcopy Create free account
hub / github.com/fastapi/fastapi / _add_lang_code_to_url

Function _add_lang_code_to_url

scripts/doc_parsing_utils.py:279–284  ·  view source on GitHub ↗
(url: str, lang_code: str)

Source from the content-addressed store, hash-verified

277
278
279def _add_lang_code_to_url(url: str, lang_code: str) -> str:
280 if url.startswith(TIANGOLO_COM):
281 rel_url = url[len(TIANGOLO_COM) :]
282 if not rel_url.startswith(ASSETS_URL_PREFIXES):
283 url = url.replace(TIANGOLO_COM, f"{TIANGOLO_COM}/{lang_code}")
284 return url
285
286
287def _construct_markdown_link(

Callers 2

_construct_markdown_linkFunction · 0.85
_construct_html_linkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected