render

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package render holds small text-shaping helpers shared by the CLI and LSP surfaces: everything user-visible passes through here so untrusted input (git metadata, source-derived signatures) is handled once.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sanitize

func Sanitize(s string) string

Sanitize strips control characters before untrusted text reaches a terminal or editor: commit titles and authors come straight from git history, where ANSI/OSC escape sequences are legal and can manipulate the viewer's terminal (title changes, cursor moves, fake hyperlinks).

func Truncate

func Truncate(s string, n int) string

Truncate shortens s to at most n runes; byte slicing would cut multi-byte characters in half.

Types

This section is empty.

Jump to

Keyboard shortcuts

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