Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's easy to process highlighting for the entire previous file plus the new file, and simply preserve it per line.


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.


"Now how do you handle the problem I called out, where the context lines are highlighted differently in both versions?"

I'm not convinced "pick one" is a horrible choice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: