MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / _has_class

Function _has_class

scripts/fetch_eurlex_fulltext.py:95–100  ·  view source on GitHub ↗

Check if any of the tag's CSS classes contain cls_fragment.

(tag: Tag, cls_fragment: str)

Source from the content-addressed store, hash-verified

93# ---------------------------------------------------------------------------
94
95def _has_class(tag: Tag, cls_fragment: str) -> bool:
96 """Check if any of the tag's CSS classes contain cls_fragment."""
97 for c in tag.get("class", []):
98 if cls_fragment in c:
99 return True
100 return False
101
102
103_LABEL_RE = re.compile(

Callers 1

_element_to_markdownFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected