Documentation ¶
Index ¶
- Variables
- func IsMarkdownFile(name string) bool
- func NewGiteaParseContext(urlPrefix string, isWiki bool) parser.Context
- func NewTaskCheckBoxHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func Render(rawBytes []byte, urlPrefix string, metas map[string]string) []byte
- func RenderRaw(body []byte, urlPrefix string, wikiMarkdown bool) []byte
- func RenderString(raw, urlPrefix string, metas map[string]string) string
- func RenderWiki(rawBytes []byte, urlPrefix string, metas map[string]string) string
- type GiteaASTTransformer
- type Parser
- type TaskCheckBoxHTMLRenderer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// MarkupName describes markup's name
MarkupName = "markdown"
)
Functions ¶
func IsMarkdownFile ¶
IsMarkdownFile reports whether name looks like a Markdown file based on its extension.
func NewGiteaParseContext ¶ added in v1.11.0
NewGiteaParseContext creates a parser.Context with the gitea context set
func NewTaskCheckBoxHTMLRenderer ¶ added in v1.11.0
func NewTaskCheckBoxHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewTaskCheckBoxHTMLRenderer creates a TaskCheckBoxHTMLRenderer to render tasklists in the gitea form.
func RenderString ¶
RenderString renders Markdown to HTML with special links and returns string type.
Types ¶
type GiteaASTTransformer ¶ added in v1.11.0
type GiteaASTTransformer struct{}
GiteaASTTransformer is a default transformer of the goldmark tree.
type TaskCheckBoxHTMLRenderer ¶ added in v1.11.0
TaskCheckBoxHTMLRenderer is a renderer.NodeRenderer implementation that renders checkboxes in list items. Overrides the default goldmark one to present the gitea format
func (*TaskCheckBoxHTMLRenderer) RegisterFuncs ¶ added in v1.11.0
func (r *TaskCheckBoxHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
Click to show internal directories.
Click to hide internal directories.