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

Function handleTag2Tag

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

Source from the content-addressed store, hash-verified

313}
314
315func handleTag2Tag(doc *goquery.Document) *goquery.Document {
316 for tag, toTag := range tag2tag {
317 doc.Find(tag).Each(func(i int, selection *goquery.Selection) {
318 if text, _ := selection.Html(); strings.TrimSpace(text) != "" {
319 selection.BeforeHtml(fmt.Sprintf("<%v>%v</%v>", toTag, text, toTag))
320 }
321 selection.Remove()
322 })
323 }
324 return doc
325}
326
327func handleNextLine(doc *goquery.Document) *goquery.Document {
328 for _, tag := range nextlineTag {

Callers 1

ConvertFunction · 0.85

Calls 1

FindMethod · 0.45

Tested by

no test coverage detected