MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / _yaml_safe

Function _yaml_safe

scripts/json_to_markdown.py:496–500  ·  view source on GitHub ↗

Quote a string if it contains YAML-special characters.

(s: str)

Source from the content-addressed store, hash-verified

494
495
496def _yaml_safe(s: str) -> str:
497 """Quote a string if it contains YAML-special characters."""
498 if any(c in s for c in (':', '#', '{', '}', '[', ']', ',', '&', '*', '?', '|', '-', '<', '>', '=', '!', '%', '@', '`')):
499 return f'"{s}"'
500 return s
501
502
503def generate_guidance_page_zh(entry: dict, fulltext: str,

Callers 3

generate_shared_sectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected