# Functions
CamoEncode encodes a lnk to fit with the go-camo and camo proxy links.
CustomLinkURLSchemes allows for additional schemes to be detected when parsing links within text.
DetectMarkupTypeByFileName returns the possible markup format type via the filename.
DetectRendererType detects the markup type of the content.
GetRendererByFileName get renderer by filename.
Init initializes the render global variables.
IsFullURLBytes reports whether link fits valid format.
NewTestRenderContext is a helper function to create a RenderContext for testing purpose It accepts string (BaseLink), map[string]string (Metas).
PostProcessCommitMessage will use the same logic as PostProcess, but will disable the shortLinkProcessor.
PostProcessCommitMessageSubject will use the same logic as PostProcess and PostProcessCommitMessage, but will disable the shortLinkProcessor and emailAddressProcessor, will add a defaultLinkProcessor if defaultLink is set, which changes every text node into a link to the passed default link.
PostProcessDefault does the final required transformations to the passed raw HTML data, and ensures its validity.
PostProcessDescriptionHTML will use similar logic as PostProcess, but will use a single special linkProcessor.
PostProcessEmoji for when we want to just process emoji and shortcodes in various places it isn't already run through the normal markdown processor.
PostProcessIssueTitle to process title on individual issue/pull page.
RegisterRenderer registers a new markup file renderer.
Render renders markup file to HTML with all specific handling stuff.
RenderString renders Markup string to HTML with all specific handling stuff and return string.
Sanitize takes a string that contains a HTML fragment or document and applies policy whitelist.
SanitizeDescription sanitizes the HTML generated for a repository description.
SanitizeReader sanitizes a Reader.
# Constants
Issue name styles.
Issue name styles.
Issue name styles.
the link is relative to the AppSubURL.
the link is relative to the default base (eg: repo link, or current ref tree path).
the link should be used to access media files (images, videos).
not really useful, mainly for environment GITEA_PREFIX_RAW for external renders.
default.
# Structs
RenderContext represents a render context.
RenderHelperFuncs is used to decouple cycle-import At the moment there are different packages: modules/markup: basic markup rendering models/renderhelper: need to access models and git repo, and models/issues needs it services/markup: some real helper functions could only be provided here because it needs to access various services & templates.
Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow any modification to the underlying policies once it's been created.
# Interfaces
ExternalRenderer defines an interface for external renderers.
PostProcessRenderer defines an interface for renderers who need post process.
Renderer defines an interface for rendering markup file to HTML.
RendererContentDetector detects if the content can be rendered by specified renderer.