Browse Source

Fix language lookup bug in geshi

Chris Han 12 years ago
parent
commit
7c9926d4bd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/geshi/geshi.php

+ 2 - 2
lib/geshi/geshi.php

@@ -808,7 +808,7 @@ class GeSHi {
         }
 
         // match the langname
-        if (!preg_match('/\'LANG_NAME\'\s*=>\s*\'((?:[^\']|\\\')+)\'/', $data, $matches)) {
+        if (!preg_match("/'LANG_NAME'\s*=>\s*'(.+|(?:\\')+)'/", $data, $matches)) {
             $this->error = sprintf('Geshi::get_lang_fullname(%s): Regex can not detect language', $language);
             return false;
         }
@@ -4752,4 +4752,4 @@ if (!function_exists('geshi_highlight')) {
     }
 }
 
-?>
+?>