Documentation
¶
Overview ¶
Package worddiff compares compose documents word by word, formatting included: the unit is a word (a CJK character, a run of whitespace, a punctuation mark) with its style and link.
Index ¶
Constants ¶
View Source
const DefaultBudget = 2_000_000
DefaultBudget is the comparisons a Diff may make before it gives up.
Variables ¶
This section is empty.
Functions ¶
func Ratio ¶
Ratio is how much changed: (words deleted + words inserted) / (old words + new words), from 0 to 1; whitespace is no word. 0 when both are empty.
Types ¶
type BlockDiff ¶
BlockDiff is a block's changes: the old block Old and the new block New (indexes into Diff's arguments), -1 for a block added or removed.
Click to show internal directories.
Click to hide internal directories.