Documentation
¶
Index ¶
- func ManualLanguageBlock(languages api.ManualLanguageFacts) string
- func MapOutsideLiteralBlocks(value string, transform func(string) string) string
- func Render(raw string) string
- func RenderMediaInfo(raw string) string
- func RenderWithImagePreviews(raw string, previews map[string]string) string
- func SplitTrailingSourceAudioSpoiler(value string) (string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManualLanguageBlock ¶ added in v0.3.2
func ManualLanguageBlock(languages api.ManualLanguageFacts) string
ManualLanguageBlock renders the manually supplied language facts for a generated BBCode description. Empty lists do not produce a line.
func MapOutsideLiteralBlocks ¶ added in v0.4.1
MapOutsideLiteralBlocks transforms BBCode without rewriting complete code and pre blocks. The transform must preserve the opaque placeholders in its input.
func Render ¶
Render converts BBCode, MediaInfo blocks, or existing HTML into HTML that has passed the package's element, attribute, class, style, and URL allowlists. Blank input returns an empty string.
func RenderMediaInfo ¶ added in v0.4.0
RenderMediaInfo returns sanitized HTML for a source-level MediaInfo preview.
func RenderWithImagePreviews ¶ added in v0.4.0
RenderWithImagePreviews substitutes known hosted thumbnails only in rendered image sources. The raw description and full-size link targets remain intact.
func SplitTrailingSourceAudioSpoiler ¶ added in v0.3.5
SplitTrailingSourceAudioSpoiler separates complete top-level audio and HDR markup so description builders can place it before their screenshot sections.
Types ¶
This section is empty.