package
1.2.0-rc1
Repository: https://github.com/adelowo/gitea.git
Documentation: pkg.go.dev

# Functions

FindAllMentions matches mention patterns in given content and returns a list of found user names without @ prefix.
InitMarkdown initialize regexps for markdown parsing.
IsMarkdownFile reports whether name looks like a Markdown file based on its extension.
IsSameDomain checks if given url string has the same hostname as current Gitea instance.
NewSanitizer initializes sanitizer with allowed attributes based on settings.
PostProcess treats different types of HTML differently, and only renders special links for plain text blocks.
Render renders Markdown to HTML with all specific handling stuff.
RenderCrossReferenceIssueIndexPattern renders issue indexes from other repositories to corresponding links.
RenderFullIssuePattern renders issues-like URLs.
RenderIssueIndexPattern renders issue indexes to corresponding links.
RenderRaw renders Markdown to HTML without handling special links.
RenderShortLinks processes [[syntax]] noLink flag disables making link tags when set to true so this function just replaces the whole [[...]] with the content text isWikiMarkdown is a flag to choose linking url prefix.
RenderSpecialLink renders mentions, indexes and SHA1 strings to corresponding links.
RenderString renders Markdown to HTML with special links and returns string type.
RenderWiki renders markdown wiki page to HTML and return HTML string.
Sanitize takes a string that contains a HTML fragment or document and applies policy whitelist.
SanitizeBytes takes a []byte slice that contains a HTML fragment or document and applies policy whitelist.
URLJoin joins url components, like path.Join, but preserving contents.

# Constants

Issue name styles.
Issue name styles.

# Variables

AnySHA1Pattern allows to split url containing SHA into parts.
CrossReferenceIssueNumericPattern matches string that references a numeric issue in a different repository e.g.
IssueAlphanumericPattern matches string that references to an alphanumeric issue, e.g.
IssueNumericPattern matches string that references to a numeric issue, e.g.
MarkupName describes markup's name.
MentionPattern matches string that mentions someone, e.g.
Sha1CurrentPattern matches string that represents a commit SHA, e.g.
ShortLinkPattern matches short but difficult to parse [[name|link|arg=test]] syntax.

# Structs

Parser implements markup.Parser.
Renderer is a extended version of underlying render object.
Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow any modification to the underlying policies once it's been created.