MCPcopy Create free account
hub / github.com/nodejs/node / markup_join

Function markup_join

deps/v8/third_party/jinja2/runtime.py:75–83  ·  view source on GitHub ↗

Concatenation that escapes if necessary and converts to string.

(seq: t.Iterable[t.Any])

Source from the content-addressed store, hash-verified

73
74
75def markup_join(seq: t.Iterable[t.Any]) -> str:
76 """Concatenation that escapes if necessary and converts to string."""
77 buf = []
78 iterator = map(soft_str, seq)
79 for arg in iterator:
80 buf.append(arg)
81 if hasattr(arg, "__html__"):
82 return Markup("").join(chain(buf, iterator))
83 return concat(buf)
84
85
86def str_join(seq: t.Iterable[t.Any]) -> str:

Callers

nothing calls this directly

Calls 5

MarkupClass · 0.90
concatFunction · 0.90
mapFunction · 0.50
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected