Skip to content

Commit

Permalink
Geshi/ExtEnscript: treats file extensions case-insensitively (#201)
Browse files Browse the repository at this point in the history
This closes #201
  • Loading branch information
danielmarschall authored and michael-o committed Nov 13, 2023
1 parent fb53171 commit 2717b1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/svnlook.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ function enscriptCommandString($path) {
$lang = false;
if (array_key_exists($filename, $extEnscript)) {
$lang = $extEnscript[$filename];
} else if ($ext && array_key_exists($ext, $extEnscript)) {
$lang = $extEnscript[$ext];
} else if ($ext && array_key_exists(strtolower($ext), $extEnscript)) {
$lang = $extEnscript[strtolower($ext)];
}

$cmd = $config->enscript.' --language=html';
Expand Down Expand Up @@ -753,7 +753,7 @@ function highlightLanguageUsingGeshi($path) {
if (substr($ext, 0, 1) == '.') $ext = substr($ext, 1);

foreach ($extGeshi as $language => $extensions) {
if (in_array($filename, $extensions) || in_array($ext, $extensions)) {
if (in_array($filename, $extensions) || in_array(strtolower($ext), $extensions)) {
if ($this->geshi === null) {
if (!defined('USE_AUTOLOADER')) {
require_once $config->getGeshiScript();
Expand Down

0 comments on commit 2717b1b

Please sign in to comment.