Tweak stas-parse action output

This commit is contained in:
Starbeamrainbowlabs 2019-08-23 01:29:11 +01:00
parent 632375417d
commit e773e36de5
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 4 additions and 4 deletions

View File

@ -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": []
},

View File

@ -336,7 +336,7 @@ register_module([
$result = "";
foreach($tokens as $token) {
if(in_array(substr($token, 1), $stas_query["exclude"])) {
$result .= "<span title='explicit exclude' style='color: red; text-decoration: dotted line-through;'>$token</span> ";
$result .= "<span title='explicit exclude' style='color: red; text-decoration: dotted line-through;'>" . substr($token, 1) . "</span> ";
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";
}