You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(dsl): add JSON double-quotes to string literals inside containers
String literal values from Literal[] and Enum when used inside
container types (List, Tuple, Dict) were emitted as bare words in the
regex (e.g. `Paris` instead of `"Paris"`). This made the generated
regex inconsistent with List[str], which correctly produces quoted
JSON strings.
Add _ensure_json_quoted() helper that wraps bare String terms in
double-quote delimiters. Applied in _handle_list, _handle_tuple and
_handle_dict so that only container contexts receive quoting.
Standalone Literal usage is unaffected.
Before: List[Literal['Paris','London']] → \[(Paris|London)...\]
After: List[Literal['Paris','London']] → \[("Paris"|"London")...\]
Fixes#1630
0 commit comments