ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/website/www.git/commit/?id=1455060650faea3657656688a06472f77928efeb

commit 1455060650faea3657656688a06472f77928efeb
Author: Andy Williams <[email protected]>
Date:   Mon Oct 30 17:59:10 2017 +0000

    WIKI CUSTOM - geshi - fix keyword lookup for our huge keyword list
---
 public_html/inc/geshi.php | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/public_html/inc/geshi.php b/public_html/inc/geshi.php
index e4b142b8..29d15f26 100644
--- a/public_html/inc/geshi.php
+++ b/public_html/inc/geshi.php
@@ -3260,6 +3260,8 @@ class GeSHi {
         $before = '';
         $after = '';
 
+        if (!$keyword_match)
+            return $match[0];
         if ($this->keyword_links) {
             // Keyword links have been ebabled
 
@@ -3760,18 +3762,18 @@ class GeSHi {
         //Load the language file
         require $file_name;
 
+        // Perhaps some checking might be added here later to check that
+        // $language data is a valid thing but maybe not
+        $this->language_data = $language_data;
+
         if (!empty($file_extn_link) && !empty($file_extn_list) &&
             file_exists($file_extn_link) && file_exists($file_extn_list)) {
             $link_array = file($file_extn_link, FILE_IGNORE_NEW_LINES | 
FILE_SKIP_EMPTY_LINES);
             $keys_array = file($file_extn_list, FILE_IGNORE_NEW_LINES | 
FILE_SKIP_EMPTY_LINES);
-            $language_data['URLS'][5] = $link_array[0];
-            $language_data['KEYWORDS'][5] = $keys_array;
+            $this->language_data['URLS'][5] = $link_array[0];
+            $this->add_keyword_group(5, null, null, $keys_array);
         }
 
-        // Perhaps some checking might be added here later to check that
-        // $language data is a valid thing but maybe not
-        $this->language_data = $language_data;
-
         // Set strict mode if should be set
         $this->strict_mode = $this->language_data['STRICT_MODE_APPLIES'];
 

-- 


Reply via email to