MCPcopy Create free account
hub / github.com/pytorch/tutorials / handle_jinja_templates

Function handle_jinja_templates

conf.py:332–335  ·  view source on GitHub ↗
(app, docname, source)

Source from the content-addressed store, hash-verified

330
331# Handling for HuggingFace Hub jinja templates
332def handle_jinja_templates(app, docname, source):
333 if "huggingface_hub/templates" in docname:
334 # Replace Jinja templates with quoted strings
335 source[0] = re.sub(r"(\{\{.*?\}\})", r'"\1"', source[0])
336
337
338# The name of the Pygments (syntax highlighting) style to use.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected