package markup import ( "bytes" "io" "golang.org/x/net/html" ) // Find the first p tag in the given html document and return its text content. func ExtractFirstParagraph(htmlReader io.Reader) string { html, err := html.Parse(htmlReader) if err != nil { return "" } ptag := findFirstElement(html, "p") if ptag == nil { return "" } return getTextContent(ptag) } // Inject a