description

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func MapOutsideLiteralBlocks(value string, transform func(string) string) string

MapOutsideLiteralBlocks transforms BBCode without rewriting complete code and pre blocks. The transform must preserve the opaque placeholders in its input.

func Render

func Render(raw string) string

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

func RenderMediaInfo(raw string) string

RenderMediaInfo returns sanitized HTML for a source-level MediaInfo preview.

func RenderWithImagePreviews added in v0.4.0

func RenderWithImagePreviews(raw string, previews map[string]string) string

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

func SplitTrailingSourceAudioSpoiler(value string) (string, string)

SplitTrailingSourceAudioSpoiler separates complete top-level audio and HDR markup so description builders can place it before their screenshot sections.

Types

This section is empty.

Directories

Path Synopsis
Package unit3d builds and cleans descriptions shared by Unit3D trackers.
Package unit3d builds and cleans descriptions shared by Unit3D trackers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL