import "code.gitea.io/gitea/modules/markup/markdown"
ast.go goldmark.go markdown.go meta.go renderconfig.go toc.go
var KindDetails = ast.NewNodeKind("Details")
KindDetails is the NodeKind for Details
var KindIcon = ast.NewNodeKind("Icon")
KindIcon is the NodeKind for Icon
var KindSummary = ast.NewNodeKind("Summary")
KindSummary is the NodeKind for Summary
var KindTaskCheckBoxListItem = ast.NewNodeKind("TaskCheckBoxListItem")
KindTaskCheckBoxListItem is the NodeKind for TaskCheckBoxListItem
var ( // MarkupName describes markup's name MarkupName = "markdown" )
ExtractMetadata consumes a markdown file, parses YAML frontmatter, and returns the frontmatter metadata separated from the markdown content
IsDetails returns true if the given node implements the Details interface, otherwise false.
IsIcon returns true if the given node implements the Icon interface, otherwise false.
IsMarkdownFile reports whether name looks like a Markdown file based on its extension.
IsSummary returns true if the given node implements the Summary interface, otherwise false.
IsTaskCheckBoxListItem returns true if the given node implements the TaskCheckBoxListItem interface, otherwise false.
NewGiteaParseContext creates a parser.Context with the gitea context set
func NewHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewHTMLRenderer creates a HTMLRenderer to render in the gitea form.
Render renders Markdown to HTML with all specific handling stuff.
RenderRaw renders Markdown to HTML without handling special links.
RenderString renders Markdown to HTML with special links and returns string type.
RenderWiki renders markdown wiki page to HTML and return HTML string
type ASTTransformer struct{}
ASTTransformer is a default transformer of the goldmark tree.
Transform transforms the given AST tree.
Details is a block that contains Summary and details
NewDetails returns a new Paragraph node.
Dump implements Node.Dump .
Kind implements Node.Kind.
HTMLRenderer is a renderer.NodeRenderer implementation that renders gitea specific features.
func (r *HTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
Header holds the data about a header.
type Icon struct { ast.BaseInline Name []byte }
Icon is an inline for a fomantic icon
NewIcon returns a new Paragraph node.
Dump implements Node.Dump .
Kind implements Node.Kind.
type Parser struct{}
Parser implements markup.Parser
Extensions implements markup.Parser
Name implements markup.Parser
func (Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte
Render implements markup.Parser
RenderConfig represents rendering configuration for this file
func (rc *RenderConfig) ToRenderConfig(meta yaml.MapSlice)
ToRenderConfig converts a yaml.MapSlice to a RenderConfig
Summary is a block that contains the summary of details block
NewSummary returns a new Summary node.
Dump implements Node.Dump .
Kind implements Node.Kind.
TaskCheckBoxListItem is a block that repressents a list item of a markdown block with a checkbox
func NewTaskCheckBoxListItem(listItem *ast.ListItem) *TaskCheckBoxListItem
NewTaskCheckBoxListItem returns a new TaskCheckBoxListItem node.
func (n *TaskCheckBoxListItem) Dump(source []byte, level int)
Dump implements Node.Dump .
func (n *TaskCheckBoxListItem) Kind() ast.NodeKind
Kind implements Node.Kind.
Package markdown imports 27 packages (graph) and is imported by 53 packages. Updated 2020-12-14. Refresh now. Tools for package owners.