寻找基于网络的差异组件

发布于 2024-08-03 21:26:48 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

じ违心 2024-08-10 21:26:48

John Resig 用 Ja​​vaScript 写了一个看起来很有趣的东西。

这里

John Resig wrote one in JavaScript that looks interesting.

Here it is.

皓月长歌 2024-08-10 21:26:48

尝试 Pretty Diff 工具。它基于 jsdifflib,但经过增强以突出显示每个字符的差异并重新构建以提高速度。它还将缩小的代码与未缩小的代码进行比较。它完全用 JavaScript 编写,支持 JavaScript、CSS 和 XML/XHTML 输入。

http://prettydiff.com/

Try Pretty Diff tool. It is based upon jsdifflib, but is enhanced to highlight per character differences and rebuilt for speed. It also compares minified code to unminified code. It is entirely written in JavaScript and supports JavaScript, CSS, and XML/XHTML input.

http://prettydiff.com/

野却迷人 2024-08-10 21:26:48

jsdifflib 看起来像一个有趣的基于 javascript 的客户端库。如果客户端实现提供了您需要的功能,我会强烈倾向于它。当您已经将数据交给客户端时,为什么还要在表示逻辑上对服务器进行征税呢?

jsdifflib looks like an interesting javascript-based client side library. I would lean strongly toward a client-side implementation if it provided the features that you needed. Why tax your servers on presentation logic when you're already handing the client the data anyway?

九厘米的零° 2024-08-10 21:26:48

差异、匹配和补丁库可通过以下相同的 API 使用: JavaScript、Java、C#、Python 和其他语言。 (它似乎曾经并且可能仍然是在 Google 文档中使用。)

有一个在线比较选项的 HTML 输出演示

鉴于客户端和服务器端语言都提供相同的 API,如果您决定要在它们之间进行切换,应该会更容易...

The Diff, Match and Patch Library is available with an identical API in JavaScript, Java, C#, Python, and other languages. (It seems to have been and may still be the one used in Google Docs.)

There is an online demo of the HTML output of the diff'ing options.

Given the identical API available on both client- and server-side languages, it should be easier to make a switch between them should you decide you want to...

苏佲洛 2024-08-10 21:26:48

如果您使用 PHP,您可能会发现 SimpleDIFF 很有帮助。

If you're working with PHP, you may find SimpleDIFF to be helpful.

蔚蓝源自深海 2024-08-10 21:26:48

查看 JavaScript diff 库 wikEd diff。它在维基百科上的小工具 wikEdDiff 中用于准确比较文章修订的要求目的。免费(公共领域)库可以检测并突出显示块移动,在单词/字符级别上工作,并吐出格式良好的文本,其中插入、删除、移动的块及其标记的原始位置。请参阅在线演示来尝试设置。

Check out the JavaScript diff library wikEd diff. It is used on Wikipedia in the gadget wikEdDiff for exactly the asked purpose to compare revisions of articles. The free (public domain) library can detect and highlight block moves, works on the word/character level, and spits out a nicely formatted text with insertions, deletions, moved blocks, and their original positions marked up. See the online demo to play with settings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文