package
1.4.0-rc3
Repository: https://github.com/inful/gitea.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

FindAllMentions matches mention patterns in given content and returns a list of found user names without @ prefix.
GetParserByFileName get parser by filename.
GetParserByType returns a parser according type.
Init initialize regexps for markdown parsing.
IsLink reports whether link fits valid format.
IsMarkupFile reports whether file is a markup type file.
IsReadmeFile reports whether name looks like a README file based on its name.
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.
RegisterParser registers a new markup file parser.
Render renders markup file to HTML with all specific handling stuff.
RenderByType renders markup to HTML with special links and returns string type.
RenderCrossReferenceIssueIndexPattern renders issue indexes from other repositories to corresponding links.
RenderFullIssuePattern renders issues-like URLs.
RenderIssueIndexPattern renders issue indexes to corresponding 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.
Type returns if markup format via the filename.
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.
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

RenderIssueIndexPatternOptions options for RenderIssueIndexPattern function.
Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow any modification to the underlying policies once it's been created.

# Interfaces

Parser defines an interface for parsering markup file to HTML.