package html
Import Path
github.com/yuin/goldmark/renderer/html (on go.dev)
Dependency Relation
imports 6 packages, and imported by 5 packages
Involved Source Files
html.go
Package-Level Type Names (total 9, in which 4 are exported)
A Config struct has configurations for the HTML based renderers.
HardWraps bool
Unsafe bool
Writer Writer
XHTML bool
SetOption implements renderer.NodeRenderer.SetOption.
*T : github.com/yuin/goldmark/renderer.SetOptioner
func NewConfig() Config
func Option.SetHTMLOption(*Config)
An Option interface sets options for HTML based renderers.
( T) SetHTMLOption(*Config)
*withHardWraps
*withUnsafe
*withWriter
*withXHTML
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
func golang.org/x/pkgsite/internal/postgres.NewHTMLRenderer(opts ...Option) renderer.NodeRenderer
func golang.org/x/pkgsite/internal/frontend.newHTMLRenderer(info *source.Info, readme *internal.Readme, opts ...Option) renderer.NodeRenderer
A Renderer struct is an implementation of renderer.NodeRenderer that renders
nodes as (X)HTML.
Config Config
Config.HardWraps bool
Config.Unsafe bool
Config.Writer Writer
Config.XHTML bool
RegisterFuncs implements NodeRenderer.RegisterFuncs .
SetOption implements renderer.NodeRenderer.SetOption.
(*T) renderAutoLink(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderBlockquote(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderCodeBlock(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderCodeSpan(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderDocument(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderEmphasis(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderFencedCodeBlock(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderHTMLBlock(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderHeading(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderImage(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderLink(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderList(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderListItem(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderParagraph(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderRawHTML(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderString(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderText(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderTextBlock(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) renderThematicBreak(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error)
(*T) writeLines(w util.BufWriter, source []byte, n ast.Node)
*T : github.com/yuin/goldmark/renderer.NodeRenderer
*T : 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.
Write writes the given source to writer with resolving references and unescaping
backslash escaped characters.
*defaultWriter
func WithWriter(writer Writer) interface{renderer.Option; Option}
Package-Level Functions (total 9, in which 8 are exported)
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.
RenderAttributes renders given node's attributes.
You can specify attribute names to render by the filter.
If filter is nil, RenderAttributes renders all attributes.
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 22, in which 12 are exported)
BlockquoteAttributeFilter defines attribute names which blockquote elements can have
CodeAttributeFilter defines attribute names which code elements can have.
DefaultWriter is a default implementation 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 4, none are exported)
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |