Comments (1)
Unable to recreate. Here are my steps:
Go to:
https://neil.fraser.name/software/diff_match_patch/demos/diff.html
Open console.
Paste your code (simplified a little bit):
var dm = new diff_match_patch();
var t1 =
"Let's enjoy right here where we at\n" +
"Who knows where this road is supposed to lead\n" +
"We got nothin' but time\n" +
"As long as you're right here next to me\n" +
"Everything's gonna be alright\n";
var t2 =
"Let's enjoy right here where we at\n" +
"Who knows where this road supposed to lead?\n" +
"We got nothin' but time\n" +
"As long as you're right here next to me\n" +
"Everythin's gonna be alright\n" +
"If it's meant to be, it'll be, it'll be\n";
var d = dm.diff_main(t1, t2);
var ds = dm.diff_prettyHtml(d);
console.log(d);
console.log(ds);
Result:
(8) [d…h.Diff, d…h.Diff, d…h.Diff, d…h.Diff, d…h.Diff, d…h.Diff, d…h.Diff, d…h.Diff]
<span>Let's enjoy right here where we at¶<br>Who knows where this road </span><del style="background:#ffe6e6;">is </del><span>supposed to lead</span><ins style="background:#e6ffe6;">?</ins><span>¶<br>We got nothin' but time¶<br>As long as you're right here next to me¶<br>Everythin</span><del style="background:#ffe6e6;">g</del><span>'s gonna be alright¶<br></span><ins style="background:#e6ffe6;">If it's meant to be, it'll be, it'll be¶<br></ins>
I don't see an error. Please reopen this bug if you are still having problems.
from diff-match-patch.
Related Issues (20)
- Wiki/Documentation: Suggested function name should be diff_wordsToChars
- diff_cleanupSemantic cleans last newline incorrect HOT 4
- diff_cleanupSemantic cleans last newline incorrect HOT 1
- Non-minimal diff returned for some inputs HOT 2
- Get fomarting diff HOT 1
- Ignore Whitespace in DiffMatchPatch HOT 3
- diff_main cost 98.6% cpu HOT 1
- Why we have not considered Line Endings for Different OS(Linux, Windows, MacOS) HOT 1
- Diff.ToString() throws a NullReferenceException
- Diff.GetHashCode() throws a NullReferenceException
- Issue: Code breaking when there is no change in a line HOT 5
- Diff is calculating very wrong results HOT 1
- Project abandoned / dead / maintained? HOT 8
- Sim locked to carrier network
- Diff Calculating wrong results for certain cases HOT 3
- Fails to add newline after patch, fails to remove last character that needs to be removed HOT 5
- Difficult to set up efficiently with diff_main!! HOT 2
- Patch margin index splits Unicode surrogate pairs unexpectedly HOT 5
- Trying to use this in .NET 481
- patch_fromText and lines breaks issue in Python HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diff-match-patch.