Hi Folks,
I did not find what I was looking for on forum world, so asking here.
I would like to "diff" to strings
"Lazy fat dog" diff: "Lazy fat cat"
I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here.
Thank you for your time
Hi Timothy --
(TextDiffBuilder from: 'Lazy fat dog' to: 'Lazy fat cat') buildDisplayPatch asMorph openInHand
Well, no in-line diffs. :-/
Best, Marcel Am 17.08.2021 09:48:32 schrieb gettimothy via Squeak-dev squeak-dev@lists.squeakfoundation.org: Hi Folks,
I did not find what I was looking for on forum world, so asking here.
I would like to "diff" to strings
"Lazy fat dog" diff: "Lazy fat cat"
I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here.
Thank you for your time
Hi Marcel.
Thank you ...
I will need the inline as my comparison is....
TextDiffBuilder from:'<div><h5> Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. </h5><table style="border: 1px solid black; border-spacing: 0; margin: 1em auto;"><caption>''An example table''</caption><tr><th style="border: 1px solid black; padding: 5px; background: #efefef;"> First header</th><th colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"> Second header</th></tr><tr colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"><td style="border: 1px solid black; padding: 5px;"> Upper left</td><td style="border: 1px solid black; padding: 5px;"> Upper middle</td><td rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"> Right side</td></tr><tr rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower left</td><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower middle</td></tr><tr style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"><td colspan="3" style="border: 1px solid black; text-align: center;">Text before a nested table...<table><caption>''A table in a table''</caption><tr colspan="3" style="border: 1px solid black; text-align: center;"><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td></tr><tr style="text-align: center; width: 150px;"><td colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;">Two Wikipedia logos</td></tr></table></td></tr></table></div>'
to: '<div><p><h5> Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. </h5><table style="border: 1px solid black; border-spacing: 0; margin: 1em auto;"><caption>''An example table''</caption><tr><th style="border: 1px solid black; padding: 5px; background: #efefef;"> First header</th><th colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"> Second header</th></tr><tr colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"><td style="border: 1px solid black; padding: 5px;"> Upper left</td><td style="border: 1px solid black; padding: 5px;"> Upper middle</td><td rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"> Right side</td></tr><tr rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower left</td><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower middle</td></tr><tr style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"><td colspan="3" style="border: 1px solid black; text-align: center;">Text before a nested table...<table><caption>''A table in a table''</caption><tr colspan="3" style="border: 1px solid black; text-align: center;"><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td></tr><tr style="text-align: center; width: 150px;"><td colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;">Two Wikipedia logos</td></tr></table></td></tr></table></p></div>') buildDisplayPatch asMorph openInHand
So, this tells me that the two strings are different, but not "where" they are different which is what you and chris mean by "inline".
Thanks for your time.
I will try emacs diff
cheers!
---- On Tue, 17 Aug 2021 04:23:06 -0400 Marcel Taeumel marcel.taeumel@hpi.de wrote ----
Hi Timothy --
(TextDiffBuilder from: 'Lazy fat dog' to: 'Lazy fat cat') buildDisplayPatch asMorph openInHand
Well, no in-line diffs. :-/
Best,
Marcel
Am 17.08.2021 09:48:32 schrieb gettimothy via Squeak-dev mailto:squeak-dev@lists.squeakfoundation.org:
Hi Folks,
I did not find what I was looking for on forum world, so asking here.
I would like to "diff" to strings
"Lazy fat dog" diff: "Lazy fat cat"
I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here.
Thank you for your time
Hi,
Just in case: (I'm on win) It's only the enclosing <p>
Cheers,
Herbert
Am 19.08.2021 um 10:03 schrieb gettimothy via Squeak-dev:
Hi Marcel.
Thank you ...
I will need the inline as my comparison is....
TextDiffBuilder from:'<div><h5> Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. </h5><table style="border: 1px solid black; border-spacing: 0; margin: 1em auto;"><caption>''An example table''</caption><tr><th style="border: 1px solid black; padding: 5px; background: #efefef;"> First header</th><th colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"> Second header</th></tr><tr colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"><td style="border: 1px solid black; padding: 5px;"> Upper left</td><td style="border: 1px solid black; padding: 5px;"> Upper middle</td><td rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"> Right side</td></tr><tr rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower left</td><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower middle</td></tr><tr style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"><td colspan="3" style="border: 1px solid black; text-align: center;">Text before a nested table...<table><caption>''A table in a table''</caption><tr colspan="3" style="border: 1px solid black; text-align: center;"><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki <https://www.wikipedia.org/wiki/Wiki>"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png <https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png>" class="linkfile"/><div class="card-section">Wiki</div></div></a></td><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki <https://www.wikipedia.org/wiki/Wiki>"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png <https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png>" class="linkfile"/><div class="card-section">Wiki</div></div></a></td></tr><tr style="text-align: center; width: 150px;"><td colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;">Two Wikipedia logos</td></tr></table></td></tr></table></div>' to: '<div><p><h5> Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. </h5><table style="border: 1px solid black; border-spacing: 0; margin: 1em auto;"><caption>''An example table''</caption><tr><th style="border: 1px solid black; padding: 5px; background: #efefef;"> First header</th><th colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"> Second header</th></tr><tr colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"><td style="border: 1px solid black; padding: 5px;"> Upper left</td><td style="border: 1px solid black; padding: 5px;"> Upper middle</td><td rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"> Right side</td></tr><tr rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower left</td><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower middle</td></tr><tr style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"><td colspan="3" style="border: 1px solid black; text-align: center;">Text before a nested table...<table><caption>''A table in a table''</caption><tr colspan="3" style="border: 1px solid black; text-align: center;"><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki <https://www.wikipedia.org/wiki/Wiki>"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png <https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png>" class="linkfile"/><div class="card-section">Wiki</div></div></a></td><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki <https://www.wikipedia.org/wiki/Wiki>"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png <https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png>" class="linkfile"/><div class="card-section">Wiki</div></div></a></td></tr><tr style="text-align: center; width: 150px;"><td colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;">Two Wikipedia logos</td></tr></table></td></tr></table></p></div>') buildDisplayPatch asMorph openInHand
So, this tells me that the two strings are different, but not "where" they are different which is what you and chris mean by "inline".
Thanks for your time.
I will try emacs diff
cheers!
---- On Tue, 17 Aug 2021 04:23:06 -0400 *Marcel Taeumel marcel.taeumel@hpi.de* wrote ----
Hi Timothy -- (TextDiffBuilder from: 'Lazy fat dog' to: 'Lazy fat cat') buildDisplayPatch asMorph openInHand Well, no in-line diffs. :-/ Best, Marcel Am 17.08.2021 09:48:32 schrieb gettimothy via Squeak-dev <squeak-dev@lists.squeakfoundation.org <mailto:squeak-dev@lists.squeakfoundation.org>>: Hi Folks, I did not find what I was looking for on forum world, so asking here. I would like to "diff" to strings "Lazy fat dog" diff: "Lazy fat cat" I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here. Thank you for your time
thank youi picked it up with emacs ediff.btw, that <p> is good news and correct peg parser output (: ---- On Thu, 19 Aug 2021 07:46:38 -0400 herbertkoenig@gmx.net wrote ----
Hi,
Just in case: (I'm on win) It's only the enclosing <p>
Cheers,
Herbert
Am 19.08.2021 um 10:03 schrieb gettimothy via Squeak-dev:
Hi Marcel.
Thank you ...
I will need the inline as my comparison is....
TextDiffBuilder from:'<div><h5> Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. </h5><table style="border: 1px solid black; border-spacing: 0; margin: 1em auto;"><caption>''An example table''</caption><tr><th style="border: 1px solid black; padding: 5px; background: #efefef;"> First header</th><th colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"> Second header</th></tr><tr colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"><td style="border: 1px solid black; padding: 5px;"> Upper left</td><td style="border: 1px solid black; padding: 5px;"> Upper middle</td><td rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"> Right side</td></tr><tr rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower left</td><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower middle</td></tr><tr style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"><td colspan="3" style="border: 1px solid black; text-align: center;">Text before a nested table...<table><caption>''A table in a table''</caption><tr colspan="3" style="border: 1px solid black; text-align: center;"><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td></tr><tr style="text-align: center; width: 150px;"><td colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;">Two Wikipedia logos</td></tr></table></td></tr></table></div>'
to: '<div><p><h5> Note: This example is not accessible, and should be avoided as much as possible. For example, nested tables (tables inside tables) should be separated into distinct tables when possible. </h5><table style="border: 1px solid black; border-spacing: 0; margin: 1em auto;"><caption>''An example table''</caption><tr><th style="border: 1px solid black; padding: 5px; background: #efefef;"> First header</th><th colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"> Second header</th></tr><tr colspan="2" style="border: 1px solid black; padding: 5px; background: #ffdead;"><td style="border: 1px solid black; padding: 5px;"> Upper left</td><td style="border: 1px solid black; padding: 5px;"> Upper middle</td><td rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"> Right side</td></tr><tr rowspan="2" style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px; vertical-align: top;"><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower left</td><td style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"> Lower middle</td></tr><tr style="border: 1px solid black; border-bottom: 3px solid grey; padding: 5px;"><td colspan="3" style="border: 1px solid black; text-align: center;">Text before a nested table...<table><caption>''A table in a table''</caption><tr colspan="3" style="border: 1px solid black; text-align: center;"><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td><td style="text-align: center; width: 150px;"> <a href="https://www.wikipedia.org/wiki/Wiki"><div class="card"><img src="https://commons.wikimedia.org/wiki/Special:Redirect/file/Wiki.png" class="linkfile"/><div class="card-section">Wiki</div></div></a></td></tr><tr style="text-align: center; width: 150px;"><td colspan="2" style="text-align:center; border-top: 1px solid red;<!-- --> border-right: 1px solid red; border-bottom: 2px solid red;<!-- --> border-left: 1px solid red;">Two Wikipedia logos</td></tr></table></td></tr></table></p></div>') buildDisplayPatch asMorph openInHand
So, this tells me that the two strings are different, but not "where" they are different which is what you and chris mean by "inline".
Thanks for your time.
I will try emacs diff
cheers!
---- On Tue, 17 Aug 2021 04:23:06 -0400 Marcel Taeumel marcel.taeumel@hpi.de wrote ----
Hi Timothy --
(TextDiffBuilder from: 'Lazy fat dog' to: 'Lazy fat cat') buildDisplayPatch asMorph openInHand
Well, no in-line diffs. :-/
Best,
Marcel
Am 17.08.2021 09:48:32 schrieb gettimothy via Squeak-dev squeak-dev@lists.squeakfoundation.org:
Hi Folks,
I did not find what I was looking for on forum world, so asking here.
I would like to "diff" to strings
"Lazy fat dog" diff: "Lazy fat cat"
I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here.
Thank you for your time
still, that is pretty cool stuff (:
---- On Tue, 17 Aug 2021 04:23:06 -0400 Marcel Taeumel mailto:marcel.taeumel@hpi.de wrote ----
Hi Timothy --
(TextDiffBuilder from: 'Lazy fat dog' to: 'Lazy fat cat') buildDisplayPatch asMorph openInHand
Well, no in-line diffs. :-/
Best,
Marcel
Am 17.08.2021 09:48:32 schrieb gettimothy via Squeak-dev mailto:squeak-dev@lists.squeakfoundation.org:
Hi Folks,
I did not find what I was looking for on forum world, so asking here.
I would like to "diff" to strings
"Lazy fat dog" diff: "Lazy fat cat"
I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here.
Thank you for your time
You can copy the first string to the clipboard, then highlight the second string and press Shift+Cmd+C.
However, as with Marcel's solution, I don't believe this provides in-line diffs.
On Tue, Aug 17, 2021 at 2:48 AM gettimothy via Squeak-dev squeak-dev@lists.squeakfoundation.org wrote:
Hi Folks,
I did not find what I was looking for on forum world, so asking here.
I would like to "diff" to strings
"Lazy fat dog" diff: "Lazy fat cat"
I took a brief glance at the Diff3 class and tests and saw nothing obvious, so I ask here.
Thank you for your time
squeak-dev@lists.squeakfoundation.org