MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _repl

Function _repl

SLiCAP/schematic/component_item.py:109–119  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

107 return _num(m.group(1), default) if m else default
108
109 def _repl(m):
110 attrs = m.group(1).decode("utf-8", "replace")
111 content = m.group(2).decode("utf-8", "replace").strip()
112 if content:
113 texts.append({
114 "x": _attr(attrs, "x", 0.0),
115 "y": _attr(attrs, "y", 0.0),
116 "size": _attr(attrs, "font-size", 8.0),
117 "content": content,
118 })
119 return b""
120
121 return _TEXT_RE.sub(_repl, svg_bytes), texts
122

Callers

nothing calls this directly

Calls 2

_attrFunction · 0.85
groupMethod · 0.80

Tested by

no test coverage detected