miniblog.

← Back to all posts
12
Syntax highlighting of diffs feels like an under-researched field. Doing a good job on incomplete snippets is a hard problem.

2 Comments

@wilfredh If you have them and the source to apply them against, you can just highlight with the diff and without, and then render the snippet.
@alanz Great point, although we don't always have that. I suppose there's also the problem of applying highlighting to extremely long files in that case too. I know several text editors try to do highlighting lazily.