mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-14 15:13:37 +08:00
93c677a6a9
Updated/added tests to cover. Support for actual search queries still remains.
14 lines
324 B
PHP
14 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 . '"';
|
|
}
|
|
}
|