MCPcopy Index your code
hub / github.com/idank/explainshell / _html_metrics

Function _html_metrics

tests/evals/render/render_eval.py:165–174  ·  view source on GitHub ↗
(html: str)

Source from the content-addressed store, hash-verified

163
164
165def _html_metrics(html: str) -> dict[str, Any]:
166 parser = TagCounter()
167 parser.feed(html)
168 tags = {tag: parser.tags.get(tag, 0) for tag in _TAGS}
169 return {
170 "tags": tags,
171 "data_chars": parser.data_chars,
172 "max_depth": parser.max_depth,
173 "chars": {ch: parser.char_hist.get(ch, 0) for ch in _SENSITIVE_CHARS},
174 }
175
176
177def _filtered_metrics(markdown: str) -> dict[str, Any]:

Callers 1

_metricsFunction · 0.85

Calls 1

TagCounterClass · 0.85

Tested by

no test coverage detected