From: Banana Date: Sun, 23 Oct 2016 16:15:14 +0000 (+0200) Subject: case insesitive X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=77b3f0990f4e3d68cc7a87cb715591ca393e6010;p=dolphin.git case insesitive --- diff --git a/static-hugo-search/search.php b/static-hugo-search/search.php index 6dee5d5..e3d6b0b 100644 --- a/static-hugo-search/search.php +++ b/static-hugo-search/search.php @@ -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>/"); foreach($headlines as $headline) { $_text = trim($headline);