MCPcopy Create free account
hub / github.com/diillson/chatcli / isBlockElement

Function isBlockElement

cli/plugins/builtin_webfetch.go:569–578  ·  view source on GitHub ↗
(tag string)

Source from the content-addressed store, hash-verified

567}
568
569func isBlockElement(tag string) bool {
570 switch tag {
571 case "p", "div", "h1", "h2", "h3", "h4", "h5", "h6",
572 "ul", "ol", "li", "table", "tr", "br", "hr",
573 "blockquote", "pre", "article", "section", "main",
574 "header", "footer", "nav", "aside", "details":
575 return true
576 }
577 return false
578}
579
580func stripHTMLTags(s string) string {
581 re := regexp.MustCompile(`<[^>]*>`)

Callers 1

extractTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected