preview

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package preview extracts short content previews from context files for status display.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentPreview

func ContentPreview(content string, n int) []string

ContentPreview returns the first n non-empty, meaningful lines from content.

Skips empty lines, YAML frontmatter delimiters, and HTML comments. Truncates lines longer than 60 characters.

Parameters:

  • content: The file content to extract preview from
  • n: Maximum number of lines to return

Returns:

  • []string: Up to n meaningful lines from the content

Types

This section is empty.

Jump to

Keyboard shortcuts

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