Extract {{var}} or {{var.field}} references from a string.
(text: str)
| 245 | # ============================================================================ |
| 246 | |
| 247 | def extract_template_vars(text: str) -> list[str]: |
| 248 | """Extract {{var}} or {{var.field}} references from a string.""" |
| 249 | if not text: |
| 250 | return [] |
| 251 | return sorted(set(re.findall(r'\{\{(\w+)(?:\.\w+)*\}\}', text))) |
| 252 | |
| 253 | |
| 254 | def determine_write_type(yaml_key: str) -> str: |
no outgoing calls
no test coverage detected