文本对比工具
两段文本行级 LCS 对比:插入删除原位着色,可忽略大小写与空白噪声,纯本地计算不上传。
Diff appears here…
How it compares
Lines are compared with the classic Longest Common Subsequence algorithm — the same approach used by git diff for line mode. Green + lines exist only in B, red − lines only in A. Each input is capped at 2,000 lines to keep the O(n·m) matrix responsive (larger inputs are truncated and flagged).
如何使用文本对比工具
原文粘左栏、新版粘右栏:差异立即逐字符高亮,插入与删除原位着色。可开关忽略大小写与空白噪声,让格式化抖动不再淹没真实改动。
这个 diff 刻意保守:只认编辑、不猜移动,因此散文、配置变更、JSON 载荷、代码片段的输出都保持可读。先跑一遍格式化再做对比,语义差异会自己浮出来。