What do you mean? First off, you're making the assumption that your highlighting library gives you results that can be trivially split per-line (e.g. no styles cross line boundaries, line boundaries are easy to find, etc). I haven't worked with web highlighting libraries so I don't know if that's true. But let's say it is. Now how do you handle the problem I called out, where the context lines are highlighted differently in both versions? You only show the context lines once in a combined diff.