Quote a string if it contains YAML-special characters.
(s: str)
| 494 | |
| 495 | |
| 496 | def _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 | |
| 503 | def generate_guidance_page_zh(entry: dict, fulltext: str, |
no outgoing calls
no test coverage detected