gitea: code.gitea.io/gitea/modules/markup/markdown Index | Files

package markdown

import "code.gitea.io/gitea/modules/markup/markdown"

Index

Package Files

markdown.go

Variables

var (
    // MarkupName describes markup's name
    MarkupName = "markdown"
)

func IsMarkdownFile Uses

func IsMarkdownFile(name string) bool

IsMarkdownFile reports whether name looks like a Markdown file based on its extension.

func Render Uses

func Render(rawBytes []byte, urlPrefix string, metas map[string]string) []byte

Render renders Markdown to HTML with all specific handling stuff.

func RenderRaw Uses

func RenderRaw(body []byte, urlPrefix string, wikiMarkdown bool) []byte

RenderRaw renders Markdown to HTML without handling special links.

func RenderString Uses

func RenderString(raw, urlPrefix string, metas map[string]string) string

RenderString renders Markdown to HTML with special links and returns string type.

func RenderWiki Uses

func RenderWiki(rawBytes []byte, urlPrefix string, metas map[string]string) string

RenderWiki renders markdown wiki page to HTML and return HTML string

type Parser Uses

type Parser struct {
}

Parser implements markup.Parser

func (Parser) Extensions Uses

func (Parser) Extensions() []string

Extensions implements markup.Parser

func (Parser) Name Uses

func (Parser) Name() string

Name implements markup.Parser

func (Parser) Render Uses

func (Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte

Render implements markup.Parser

type Renderer Uses

type Renderer struct {
    blackfriday.Renderer
    URLPrefix string
    IsWiki    bool
}

Renderer is a extended version of underlying render object.

func (*Renderer) Image Uses

func (r *Renderer) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte)

Image defines how images should be processed to produce corresponding HTML elements.

func (r *Renderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte)

Link defines how formal links should be processed to produce corresponding HTML elements.

func (*Renderer) List Uses

func (r *Renderer) List(out *bytes.Buffer, text func() bool, flags int)

List renders markdown bullet or digit lists to HTML

func (*Renderer) ListItem Uses

func (r *Renderer) ListItem(out *bytes.Buffer, text []byte, flags int)

ListItem defines how list items should be processed to produce corresponding HTML elements.

Package markdown imports 6 packages (graph) and is imported by 10 packages. Updated 2019-07-19. Refresh now. Tools for package owners.