We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89526cb commit 26c39f8Copy full SHA for 26c39f8
tdom/processor.py
@@ -339,12 +339,12 @@ def _resolve_t_text_ref(
339
if ref.is_static:
340
return Text(ref.strings[0])
341
342
- def to_node(part: str | Interpolation) -> Node:
343
- if isinstance(part, str):
344
- return Text(part)
345
- return _node_from_value(format_interpolation(part))
346
-
347
- parts = [to_node(part) for part in _resolve_ref(ref, interpolations)]
+ parts = [
+ Text(part)
+ if isinstance(part, str)
+ else _node_from_value(format_interpolation(part))
+ for part in _resolve_ref(ref, interpolations)
+ ]
348
flat = _flatten_nodes(parts)
349
350
if len(flat) == 1 and isinstance(flat[0], Text):
0 commit comments