alt text for hoot images
This commit is contained in:
parent
6d52b4f492
commit
9b8018ff26
2
hoot.go
2
hoot.go
|
@ -57,7 +57,7 @@ func hootextractor(r io.Reader, url string, seen map[string]bool) string {
|
||||||
if htfilter.HasClass(node, "Emoji") && alt != "" {
|
if htfilter.HasClass(node, "Emoji") && alt != "" {
|
||||||
return alt
|
return alt
|
||||||
}
|
}
|
||||||
return fmt.Sprintf(" <img src='%s'>", htfilter.GetAttr(node, "src"))
|
return fmt.Sprintf(" <img src='%s' alt='%s'>", htfilter.GetAttr(node, "src"), alt)
|
||||||
}
|
}
|
||||||
|
|
||||||
var buf strings.Builder
|
var buf strings.Builder
|
||||||
|
|
Loading…
Reference in New Issue