4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-11 21:16:27 +00:00

Update vendor (#1461)

* Update vendored libs

* Fix slack api changes
This commit is contained in:
Wim
2021-05-05 22:03:28 +02:00
committed by GitHub
parent af543dcd05
commit a0bca42a7a
46 changed files with 430 additions and 1652 deletions

View File

@ -9,7 +9,7 @@ A renderer can be configured with multiple options:
flags := html.CommonFlags | html.CompletePage | html.HrefTargetBlank
opts := html.RendererOptions{
TItle: "A custom title",
Title: "A custom title",
Flags: flags,
}
renderer := html.NewRenderer(opts)

View File

@ -43,6 +43,7 @@ const (
SmartypantsAngledQuotes // Enable angled double quotes (with Smartypants) for double quotes rendering
SmartypantsQuotesNBSP // Enable « French guillemets » (with Smartypants)
TOC // Generate a table of contents
LazyLoadImages // Include loading="lazy" with images
CommonFlags Flags = Smartypants | SmartypantsFractions | SmartypantsDashes | SmartypantsLatexDashes
)
@ -589,7 +590,11 @@ func (r *Renderer) imageEnter(w io.Writer, image *ast.Image) {
//if options.safe && potentiallyUnsafe(dest) {
//out(w, `<img src="" alt="`)
//} else {
r.Outs(w, `<img src="`)
if r.opts.Flags&LazyLoadImages != 0 {
r.Outs(w, `<img loading="lazy" src="`)
} else {
r.Outs(w, `<img src="`)
}
escLink(w, dest)
r.Outs(w, `" alt="`)
//}