def call_highlight(old, new): """Calls diff highlighting code only if the target is set. Otherwise, highlight as a normal unit. """ if isinstance(old, multistring): old_value = old.strings else: old_value = old if list_empty(old_value): return fancy_highlight(new) else: return highlight_diffs(old, new)
def call_highlight(old, new): """Calls diff highlighting code only if the target is set. Otherwise, highlight as a normal unit. """ if isinstance(old, multistring): old_value = old.strings else: old_value = old if list_empty(old_value): return fancy_highlight(new) else: return highlight_diffs(old, new)