mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 15:32:14 +00:00
Added unicode support
This commit is contained in:
@@ -67,8 +67,8 @@ def model_compare(oldObj, newObj, excluded_keys=[]):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def diff(self):
|
def diff(self):
|
||||||
oldText = str(self.display_value(self._old)) or ""
|
oldText = unicode(self.display_value(self._old)) or ""
|
||||||
newText = str(self.display_value(self._new)) or ""
|
newText = unicode(self.display_value(self._new)) or ""
|
||||||
dmp = diff_match_patch()
|
dmp = diff_match_patch()
|
||||||
diffs = dmp.diff_main(oldText, newText)
|
diffs = dmp.diff_main(oldText, newText)
|
||||||
dmp.diff_cleanupSemantic(diffs)
|
dmp.diff_cleanupSemantic(diffs)
|
||||||
|
|||||||
Reference in New Issue
Block a user