Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions html.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ type HtmlRendererParameters struct {
HeaderIDPrefix string
// If set, add this text to the back of each Header ID, to ensure uniqueness.
HeaderIDSuffix string
// If set, add this style to each image.
ImageStyleTag string
}

// Html is a type that implements the Renderer interface for HTML output.
Expand Down Expand Up @@ -521,6 +523,10 @@ func (options *Html) Image(out *bytes.Buffer, link []byte, title []byte, alt []b
out.WriteString("\" title=\"")
attrEscape(out, title)
}
if options.parameters.ImageStyleTag != "" {
out.WriteString("\" style=\"")
attrEscape(out, []byte(options.parameters.ImageStyleTag))
}

out.WriteByte('"')
out.WriteString(options.closeTag)
Expand Down