Skip to content

docs: explain oneChangePerToken whitespace in diffWords - #706

Open
x0Lazarus wants to merge 1 commit into
kpdecker:masterfrom
x0Lazarus:docs/one-change-word-whitespace
Open

x0Lazarus wants to merge 1 commit into
kpdecker:masterfrom
x0Lazarus:docs/one-change-word-whitespace

Conversation

@x0Lazarus

Copy link
Copy Markdown

Refs #698.

Clarify in the README and oneChangePerToken option documentation that diffWords's default whitespace-insensitive mode retains overlapping whitespace between tokens. Include the reported example and point callers who need separate whitespace tokens to diffWordsWithSpace.

This documents existing behavior; it leaves the runtime semantics unchanged.

Validation on Node 24.19.0: build, lint, type checks and ESM/CommonJS examples pass; 45 word-diff tests pass. With the project's Babel preload and an LF README, the full suite has 315 passes and the same three failures on base and patch: two Windows file-mode assertions and a hunk-test timeout. The initial yarn test run stopped loading the README example from a CRLF checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant