ghwikipp: search: Now works with wiki subdirectories.

From c602d5f8db92649517d3734c9f846002e08932ad Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 11 Apr 2024 11:20:52 -0400
Subject: [PATCH] search: Now works with wiki subdirectories.

Fixes #55.
---
 index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.php b/index.php
index 6f136fc..f5e301b 100644
--- a/index.php
+++ b/index.php
@@ -1263,7 +1263,7 @@ function build_index($base, $dname, &$output)
 
         $pagehits = array();
         foreach ($output as $l) {
-            if (preg_match('/^.*\/(.*)\..*?\:(.*)$/', $l, $matches) != 1) { continue; }
+            if (preg_match("/^.*\/$raw_data\/(.*)\..*?\:(.*)$/", $l, $matches) != 1) { continue; }
             $p = $matches[1];
             $txt = $matches[2];
             if (!isset($pagehits[$p])) {