Documentation
¶
Overview ¶
Package jsdiff ports the parts of the npm `diff` package (jsdiff 8.0.4) that Pi calls: diffWords, which Pi's renderDiff uses for intra-line highlighting, and diffLines, behind the edit tool's display diff and patch. Both are Myers' algorithm over tokens; the word diff attaches whitespace to its tokens and runs a whitespace tidy pass.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
Change is one jsdiff change object: a run of text kept, added or removed.
type LineDiff ¶
type LineDiff struct {
Runs []LineRun
// contains filtered or unexported fields
}
LineDiff is jsdiff's diffLines(oldStr, newStr) as runs of lines read from the texts on demand.
func DiffLineRuns ¶
DiffLineRuns is jsdiff's diffLines(oldStr, newStr) with default options, without the change values.
Click to show internal directories.
Click to hide internal directories.