I think it might be easier to get to a syntax-aware diff if one approached it reusing the language specific syntax highlighting specs used in various editors. I&#x27;ve almost sat down to start that myself a few times.