wrap

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

Documentation

Overview

Package wrap soft-wraps long lines in journal files to approximately 80 characters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SoftWrap

func SoftWrap(line string, width int) []string

SoftWrap breaks a long line at word boundaries, preserving leading indent.

Parameters:

  • line: Single line to wrap
  • width: Target line width in characters

Returns:

  • []string: Wrapped lines preserving the original indentation

func SoftWrapContent

func SoftWrapContent(content string) string

SoftWrapContent wraps long lines in source journal files to ~80 characters. Skips only frontmatter and table rows. Wraps everything else including content inside code fences - journal files are reference material, not executable code.

Parameters:

  • content: Journal entry content with potentially long lines

Returns:

  • string: Content with long lines soft-wrapped at word boundaries

Types

This section is empty.

Jump to

Keyboard shortcuts

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