package
1.9.0-dev
Repository: https://github.com/vlorc/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
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 does the final required transformations to the passed raw HTML data, and ensures its validity.
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.
RenderCommitMessage will use the same logic as PostProcess, but will disable the shortLinkProcessor and will add a defaultLinkProcessor if defaultLink is set, which changes every text node into a link to the passed default link.
RenderDescriptionHTML will use similar logic as PostProcess, but will use a single special linkProcessor.
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.

# Constants

Issue name styles.
Issue name styles.

# Structs

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.