inline

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package inline renders AST-aware inline diffs.

Package inline renders AST-aware inline diffs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(srcFile, dstFile string, srcBytes, dstBytes []byte, env *serialize.Envelope, opts RenderOptions, th *theme.Theme) string

Render formats the diff envelope as an inline diff with AST highlights and move markers.

Types

type RenderOptions

type RenderOptions struct {
	// Color toggles ANSI color codes in the output.
	Color bool
	// ContextLines sets how many surrounding unchanged lines to show (defaults to 3).
	ContextLines int
	// LineNumbers prints line numbers in a side-by-side gutter.
	LineNumbers bool
	// DisableAnnotations suppresses AST move and token move ghost text annotations.
	DisableAnnotations bool
}

RenderOptions tunes how the inline diff is rendered.

Jump to

Keyboard shortcuts

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