MCPcopy Index your code
hub / github.com/TruthHun/BookStack / handleBlockTag

Function handleBlockTag

utils/html2md/html2markdown.go:185–200  ·  view source on GitHub ↗
(doc *goquery.Document)

Source from the content-addressed store, hash-verified

183}
184
185func handleBlockTag(doc *goquery.Document) *goquery.Document {
186 for _, tag := range blockTag {
187 hasTag := true
188 for hasTag {
189 if tagEle := doc.Find(tag); len(tagEle.Nodes) > 0 {
190 tagEle.Each(func(i int, selection *goquery.Selection) {
191 selection.BeforeHtml("\n" + getInnerHtml(selection) + "\n")
192 selection.Remove()
193 })
194 } else {
195 hasTag = false
196 }
197 }
198 }
199 return doc
200}
201
202//func handleBlockquote(doc *goquery.Document) *goquery.Document {
203// if tagEle := doc.Find("blockquote"); len(tagEle.Nodes) > 0 {

Callers 1

ConvertFunction · 0.85

Calls 2

getInnerHtmlFunction · 0.85
FindMethod · 0.45

Tested by

no test coverage detected