package html

Import Path
	github.com/yuin/goldmark/renderer/html (on go.dev)

Dependency Relation
	imports 8 packages, and imported by 3 packages

Involved Source Files Package html implements renderer that outputs HTMLs.
Package-Level Type Names (total 7)
/* sort by: | */
A Config struct has configurations for the HTML based renderers. EastAsianLineBreaks EastAsianLineBreaks HardWraps bool Unsafe bool Writer Writer XHTML bool SetOption implements renderer.NodeRenderer.SetOption. *Config : github.com/yuin/goldmark/renderer.SetOptioner func NewConfig() Config func Option.SetHTMLOption(*Config)
A EastAsianLineBreaks is a style of east asian line breaks. func WithEastAsianLineBreaks(e EastAsianLineBreaks) interface{renderer.Option; Option} const EastAsianLineBreaksCSS3Draft const EastAsianLineBreaksNone const EastAsianLineBreaksSimple
An Option interface sets options for HTML based renderers. ( Option) SetHTMLOption(*Config) func NewRenderer(opts ...Option) renderer.NodeRenderer func github.com/yuin/goldmark/extension.NewDefinitionListHTMLRenderer(opts ...Option) renderer.NodeRenderer func github.com/yuin/goldmark/extension.NewStrikethroughHTMLRenderer(opts ...Option) renderer.NodeRenderer func github.com/yuin/goldmark/extension.NewTaskCheckBoxHTMLRenderer(opts ...Option) renderer.NodeRenderer func github.com/yuin/goldmark/extension.WithFootnoteHTMLOptions(opts ...Option) extension.FootnoteOption func github.com/yuin/goldmark/extension.WithTableHTMLOptions(opts ...Option) extension.TableOption
A Renderer struct is an implementation of renderer.NodeRenderer that renders nodes as (X)HTML. Config Config Config.EastAsianLineBreaks EastAsianLineBreaks Config.HardWraps bool Config.Unsafe bool Config.Writer Writer Config.XHTML bool RegisterFuncs implements NodeRenderer.RegisterFuncs . SetOption implements renderer.NodeRenderer.SetOption. *Renderer : github.com/yuin/goldmark/renderer.NodeRenderer *Renderer : github.com/yuin/goldmark/renderer.SetOptioner
A Writer interface writes textual contents to a writer. RawWrite writes the given source to writer without resolving references and unescaping backslash escaped characters. SecureWrite writes the given source to writer with replacing insecure characters. Write writes the given source to writer with resolving references and unescaping backslash escaped characters. func NewWriter(opts ...WriterOption) Writer func WithWriter(writer Writer) interface{renderer.Option; Option} var DefaultWriter
A WriterConfig struct has configurations for the HTML based writers. EscapedSpace is an option that indicates that a '\' escaped half-space(0x20) should not be rendered.
A WriterOption interface sets options for HTML based writers. func WithEscapedSpace() WriterOption func NewWriter(opts ...WriterOption) Writer
Package-Level Functions (total 11)
IsDangerousURL returns true if the given url seems a potentially dangerous url, otherwise false.
NewConfig returns a new Config with defaults.
NewRenderer returns a new Renderer with given options.
NewWriter returns a new Writer.
RenderAttributes renders given node's attributes. You can specify attribute names to render by the filter. If filter is nil, RenderAttributes renders all attributes.
WithEastAsianLineBreaks is a functional option that indicates whether softline breaks between east asian wide characters should be ignored.
WithEscapedSpace is a WriterOption indicates that a '\' escaped half-space(0x20) should not be rendered.
WithHardWraps is a functional option that indicates whether softline breaks should be rendered as '<br>'.
WithUnsafe is a functional option that renders dangerous contents (raw htmls and potentially dangerous links) as it is.
WithWriter is a functional option that allow you to set the given writer to the renderer.
WithXHTML is a functional option indicates that nodes should be rendered in xhtml instead of HTML5.
Package-Level Variables (total 12)
BlockquoteAttributeFilter defines attribute names which blockquote elements can have.
CodeAttributeFilter defines attribute names which code elements can have.
DefaultWriter is a default instance of the Writer.
EmphasisAttributeFilter defines attribute names which emphasis elements can have.
GlobalAttributeFilter defines attribute names which any elements can have.
HeadingAttributeFilter defines attribute names which heading elements can have.
ImageAttributeFilter defines attribute names which image elements can have.
LinkAttributeFilter defines attribute names which link elements can have.
ListAttributeFilter defines attribute names which list elements can have.
ListItemAttributeFilter defines attribute names which list item elements can have.
ParagraphAttributeFilter defines attribute names which paragraph elements can have.
ThematicAttributeFilter defines attribute names which hr elements can have.
Package-Level Constants (total 3)
EastAsianLineBreaksCSS3Draft follows CSS text level3 "Segment Break Transformation Rules" with some enhancements.
EastAsianLineBreaksNone renders line breaks as it is.
EastAsianLineBreaksSimple follows east_asian_line_breaks in Pandoc.