MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / removeElement

Function removeElement

sdk/src/tools/read-url.ts:125–130  ·  view source on GitHub ↗
(html: string, tagName: string)

Source from the content-addressed store, hash-verified

123}
124
125function removeElement(html: string, tagName: string): string {
126 return html.replace(
127 new RegExp(`<${tagName}\\b[^>]*>[\\s\\S]*?<\\/${tagName}>`, 'gi'),
128 '\n',
129 )
130}
131
132function extractElementContents(html: string, tagName: string): string[] {
133 const matches = html.matchAll(

Callers 1

extractHtmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected