(raw string)
| 285 | } |
| 286 | |
| 287 | func extractTextFromHTML(raw string) string { |
| 288 | s := htmlScriptStyleRe.ReplaceAllString(raw, " ") |
| 289 | s = htmlCommentRe.ReplaceAllString(s, " ") |
| 290 | s = htmlTagRe.ReplaceAllString(s, " ") |
| 291 | s = html.UnescapeString(s) |
| 292 | return normalizeWebFetchText(s) |
| 293 | } |
| 294 | |
| 295 | func normalizeWebFetchText(raw string) string { |
| 296 | raw = strings.ReplaceAll(raw, "\r\n", "\n") |
no test coverage detected