comparison

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockRanges

func BlockRanges(value string) [][2]int

BlockRanges returns complete comparison BBCode blocks, including nested spoiler and comparison tags, as half-open byte ranges in source order.

func MapOutsideBlocks

func MapOutsideBlocks(value string, transform func(string) string) string

MapOutsideBlocks applies transform to the text around complete comparison blocks while retaining each block byte for byte. It also transforms an empty fragment before or after a block, as it does for input without any blocks.

func RemoveComparisonBlocks

func RemoveComparisonBlocks(value string) string

RemoveComparisonBlocks strips complete comparison blocks without changing the BBCode before or after them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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