fix(workflow): update output pattern to handle standalone curly braces

This commit is contained in:
Timebomb2018
2026-04-10 15:24:18 +08:00
parent 4ce6fede67
commit 068e2bfb7e

View File

@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
# Example: # Example:
# "Hello {{user.name}}!" -> # "Hello {{user.name}}!" ->
# ["Hello ", "{{user.name}}", "!"] # ["Hello ", "{{user.name}}", "!"]
_OUTPUT_PATTERN = re.compile(r'\{\{.*?}}|[^{}]+') _OUTPUT_PATTERN = re.compile(r'\{\{.*?}}|[^{]+|{')
# Strict variable format: {{ node_id.field_name }} # Strict variable format: {{ node_id.field_name }}
_VARIABLE_PATTERN = re.compile(r'\{\{\s*[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+\s*}}') _VARIABLE_PATTERN = re.compile(r'\{\{\s*[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+\s*}}')