]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7950 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Jan 2026 10:29:33 +0000 (11:29 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Jan 2026 10:29:33 +0000 (11:29 +0100)
app/Fluidbook/Compiler/Compiler.php

index 48bf0101d92b1754f78a6ded0a9a68b758e4befd..a33d188dd84e566f1077876da4d1b5f4cde49f7e 100644 (file)
@@ -2755,7 +2755,12 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
 
     public function addSearchWord($to, $page, $array)
     {
-
+        $words = Text::splitWords(mb_strtolower(Text::deaccent($to)));
+        foreach ($words as $word) {
+            $w = $this->config->get('searchWords.' . $word, []);
+            $w[] = ['page' => $page, 'coords' => $array];
+            $this->config->set('searchWords.' . $word, $w);
+        }
     }
 }