Fix docs mistake
This commit is contained in:
parent
0f5d1b102e
commit
619202acf8
2 changed files with 2 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ changed = "Hello beautiful world"
|
||||||
|
|
||||||
# Generate a compact diff
|
# Generate a compact diff
|
||||||
d = diff(original, changed)
|
d = diff(original, changed)
|
||||||
print(d) # [5, ' beautiful world']
|
print(d) # [5, ' beautiful', 6]
|
||||||
|
|
||||||
# Reconstruct the changed text from the diff
|
# Reconstruct the changed text from the diff
|
||||||
reconstructed = undiff(original, d)
|
reconstructed = undiff(original, d)
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ const changed = 'Hello beautiful world';
|
||||||
|
|
||||||
// Generate a compact diff
|
// Generate a compact diff
|
||||||
const changes = diff(original, changed);
|
const changes = diff(original, changed);
|
||||||
console.log(changes); // [5, " beautiful world"]
|
console.log(changes); // [5, " beautiful", 6]
|
||||||
|
|
||||||
// Reconstruct the changed text from the diff
|
// Reconstruct the changed text from the diff
|
||||||
const reconstructed = undiff(original, changes);
|
const reconstructed = undiff(original, changes);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue