1

It appears Python's difflib.HtmlDiff, rather than using INS and DEL, uses SPAN elements with custom classes:

python -c 'import difflib; txt1 = "lorem ipsum\ndolor sit amet".splitlines(); txt2 = "lorem foo isum\ndolor amet".splitlines(); d = difflib.HtmlDiff(); print d.make_table(txt1, txt2)'

Before I go about fixing this myself, has anyone looked into this already? Is there perhaps a valid reason for not using POSH? (Google wasn't a big help here... )

4

2 回答 2

3

Aaron Swartz 的这个脚本使用 difflib 来输出ins/ del

于 2009-12-29T20:34:10.447 回答
2

python 错误跟踪器在这里:http ://bugs.python.org/

在这个问题上没有公开的错误,我猜这是因为大多数人不会关心它是什么类型的 html,只要它有效。如果它对您很重要,请提交错误并提交补丁。

于 2009-05-06T19:56:07.933 回答