X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/df13f9818cca65a334738d144914079ce3dc01beb08c069177a194ef8e448e8b..427433c9d2a03fbe9535cc18685567c09009432e5f1fd4a79cfbd9aec89b281a:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index b6f6236..e6bbf78 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -166,6 +166,12 @@ our @diff_opts = ('-M'); # taken from git_commit # the gitweb domain. our $prevent_xss = 0; +# Path to the highlight executable to use (must be the one from +# http://www.andre-simon.de due to assumptions about parameters and output). +# Useful if highlight is not installed on your webserver's PATH. +# [Default: highlight] +our $highlight_bin = "++HIGHLIGHT_BIN++"; + # information about snapshot formats that gitweb is capable of serving our %known_snapshot_formats = ( # name => { @@ -3361,7 +3367,8 @@ sub run_highlighter { close $fd or die_error(404, "Reading blob failed"); open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ". - "highlight --xhtml --fragment --syntax $syntax |" + quote_command($highlight_bin). + " --xhtml --fragment --syntax $syntax |" or die_error(500, "Couldn't open file or run syntax highlighter"); return $fd; }