From e773e36de5527a34bb359437d2bc206a7c8812a0 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 23 Aug 2019 01:29:11 +0100 Subject: [PATCH] Tweak stas-parse action output --- module_index.json | 2 +- modules/feature-search.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module_index.json b/module_index.json index ef6fbf7..7da4a55 100755 --- a/module_index.json +++ b/module_index.json @@ -135,7 +135,7 @@ "version": "0.10", "author": "Starbeamrainbowlabs", "description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.", - "lastupdate": 1566519828, + "lastupdate": 1566520130, "optional": false, "extra_data": [] }, diff --git a/modules/feature-search.php b/modules/feature-search.php index dca4539..f65b1a0 100644 --- a/modules/feature-search.php +++ b/modules/feature-search.php @@ -336,7 +336,7 @@ register_module([ $result = ""; foreach($tokens as $token) { if(in_array(substr($token, 1), $stas_query["exclude"])) { - $result .= "$token "; + $result .= "" . substr($token, 1) . " "; continue; } @@ -362,8 +362,8 @@ register_module([ } switch($term["location"]) { case "body": $style = "color: cyan"; $title = "body only"; break; - case "title": $style .= "font-weight: bolder; font-size: 1.2em; color: orange;"; $title = "searching title only"; break; - case "tags": $style .= "font-weight: bolder; color: purple;"; $title = "searching tags only"; break; + case "title": $style .= "font-weight: bolder; font-size: 1.2em; color: orange;"; $title = "searching title only"; $token = $token_part; break; + case "tags": $style .= "font-weight: bolder; color: purple;"; $title = "searching tags only"; $token = $token_part; break; case "all": $title .= ", searching everywhere"; }