Python的语义标记';s difflib.HtmlDiff

Python的语义标记';s difflib.HtmlDiff,python,diff,semantics,Python,Diff,Semantics,看起来Python的difflib.HtmlDiff,而不是使用INS和DEL,而是使用SPAN元素和自定义类: 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)' 在我自己动手解决

看起来Python的
difflib.HtmlDiff
,而不是使用
INS
DEL
,而是使用
SPAN
元素和自定义类:

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)'
在我自己动手解决这个问题之前,有人已经调查过了吗? 不使用POSH是否有合理的理由?
(谷歌在这里帮不了什么忙…

python bug追踪器就在这里:


在这个问题上没有公开的bug,我想这是因为大多数人都不在乎它是什么类型的html,只要它能工作。如果这对您很重要,请提交一个bug并提交一个补丁。

python bug跟踪器在这里:


在这个问题上没有公开的bug,我想这是因为大多数人都不在乎它是什么类型的html,只要它能工作。如果这对您很重要,请提交一个bug并提交一个补丁。

由Aaron Swartz使用difflib输出
ins
/
del
由Aaron Swartz使用difflib输出
ins
/
del
谢谢。但是,我认为现在更改标记会对向后兼容性造成问题…谢谢。但是,我认为现在更改标记将是一个问题,因为向后兼容。。。