modulepackage
0.1.2
Repository: https://github.com/codemicro/htmlrenderer.git
Documentation: pkg.go.dev
# README
htmlRenderer
This is a personal fork of the Goldmark HTML renderer. I would encourage you not to use it, but if you really want to, you can find the docs here and you can install it as shown:
go get github.com/codemicro/htmlRenderer
# Functions
IsDangerousURL returns true if the given url seems a potentially dangerous url, otherwise false.
NewConfig returns a new Config with defaults.
NewProcessor creates a new instance of goldmark.Markdown for processing Markdown.
NewRenderer returns a new Renderer with given options.
RenderAttributes renders given node's attributes.
WithExternalLinkProtection renders anchors to external sites with rel="noopener noreferrer".
WithHardWraps is a functional option that indicates whether softline breaks should be rendered as '<br>'.
WithHeaderLinks renders anchors next to Markdown titles with their IDs.
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.
# Variables
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.