gitweb: refactor blob syntax guessing/highlighting
commit2b17b72350f4ed7ceb5dd7242985c396cbfce23e
authorKyle J. McKay <mackyle@gmail.com>
Fri, 17 Apr 2015 16:55:24 +0000 (17 09:55 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 17 Apr 2015 16:55:24 +0000 (17 09:55 -0700)
treeb6848d07798db213081801a0c4d791e549a7930e
parentf2e1d98e0fc53f963981894c6ad9e073421929f4
gitweb: refactor blob syntax guessing/highlighting

Make run_highlighter always run the highlighter unless
no syntax was passed in or $highlignt_bin is undefined.

Make guess_file_syntax always guess unless it gets invalid
arguments and pass it the open $fd so it can peek.

If highlighting is not enabled, don't even call
guess_file_syntax or run_highlighter in the first place.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
gitweb/gitweb.perl