0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-03-29 18:11:35 +00:00
BookStackApp_BookStack/app/Search/Options/ExactSearchOption.php
Dan Brown 93c677a6a9
Searching: Added negation support to UI and term handling
Updated/added tests to cover.
Support for actual search queries still remains.
2024-10-03 15:59:50 +01:00

13 lines
324 B
PHP

<?php
namespace BookStack\Search\Options;
class ExactSearchOption extends SearchOption
{
public function toString(): string
{
$escaped = str_replace('\\', '\\\\', $this->value);
$escaped = str_replace('"', '\"', $escaped);
return ($this->negated ? '-' : '') . '"' . $escaped . '"';
}
}