MCPcopy Index your code
hub / github.com/apache/answer / FetchExcerpt

Function FetchExcerpt

pkg/htmltext/htmltext.go:112–114  ·  view source on GitHub ↗

FetchExcerpt return the excerpt from the HTML string

(html, trimMarker string, limit int)

Source from the content-addressed store, hash-verified

110
111// FetchExcerpt return the excerpt from the HTML string
112func FetchExcerpt(html, trimMarker string, limit int) (text string) {
113 return FetchRangedExcerpt(html, trimMarker, 0, limit)
114}
115
116// findFirstMatchedWord returns the first matched word and its index
117func findFirstMatchedWord(text string, words []string) (string, int) {

Callers 11

QuestionInfoMethod · 0.92
TagInfoMethod · 0.92
FormatQuestionsPageMethod · 0.92
GetQuestionMethod · 0.92
InsertMethod · 0.92
AdminShowFormatMethod · 0.92
GetTagInfoMethod · 0.92
GetTagWithPageMethod · 0.92
TestFetchExcerptFunction · 0.85

Calls 1

FetchRangedExcerptFunction · 0.85

Tested by 1

TestFetchExcerptFunction · 0.68