]> 91.132.146.200 Git - dolphin.git/commitdiff
case insesitive
authorBanana <banana@optimus.de>
Sun, 23 Oct 2016 16:15:14 +0000 (18:15 +0200)
committerBanana <banana@optimus.de>
Sun, 23 Oct 2016 16:15:14 +0000 (18:15 +0200)
static-hugo-search/search.php

index 6dee5d5efa3c1822a3a39a2a0e649788e9414931..e3d6b0b8667f05297933c078a069ad6cc3a75cd7 100644 (file)
@@ -69,11 +69,12 @@ if(isset($_POST['query'])) {
                                if($limit > 30) break;
 
                                $stream = new SplFileObject($file); 
-                               $grepped = new RegexIterator($stream, '/'.$searchStr.'/'); 
+                               $grepped = new RegexIterator($stream, '/'.$searchStr.'/i'); 
                                foreach($grepped as $found) {
                                        $_text = $file;
 
-                                       
+                                       # this search for a headline tag and the result will be used as
+                                       # the result text in the search results
                                        $headlines = new RegexIterator($stream,"/<h2>([^<]+)<\/h2>/");
                                        foreach($headlines as $headline) {
                                                $_text = trim($headline);