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

Function GetTextFromHtml

utils/util.go:759–764  ·  view source on GitHub ↗

从HTML中获取text

(htmlStr string)

Source from the content-addressed store, hash-verified

757
758// 从HTML中获取text
759func GetTextFromHtml(htmlStr string) (txt string) {
760 if doc, err := goquery.NewDocumentFromReader(strings.NewReader(htmlStr)); err == nil {
761 txt = strings.TrimSpace(doc.Find("body").Text())
762 }
763 return
764}
765
766// Git Clone
767func GitClone(url, folder string) error {

Callers 4

SearchDocMethod · 0.92
ReleaseContentMethod · 0.92
GenerateBookMethod · 0.92
generateMethod · 0.92

Calls 1

FindMethod · 0.45

Tested by

no test coverage detected