- This commit doesn't change the way syntax highlighting is done.
- But due to changes in `radicle-httpd` we can highlight the entire
files of a changeset, and then replace the plain text lines with
highlighted ones.
- Also highlights only the files currently visible of a changeset.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
libgit2 optimizes around not loading the content, when there's no
content callbacks configured.
So we aren't able to get a clear answer from radicle-surf if a file in a
diff is a binary or not.
A simple way without doing additional API requests is to check if the
file type is a executable and if there are no hunks (since we don't get
any deltas in binaries), this is a strong
indicator for a binary.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>