Re-add support for raw text searching.
This commit is contained in:
parent
84ef5d1bf3
commit
b53e99306c
|
@ -78,7 +78,14 @@ std::vector<match> search(const fs::path &filepath,
|
||||||
for (const auto &file : book.files)
|
for (const auto &file : book.files)
|
||||||
{
|
{
|
||||||
const auto &doc{file.second};
|
const auto &doc{file.second};
|
||||||
const auto &text{doc.text_cleaned};
|
const auto &text{[&doc, &opts]
|
||||||
|
{
|
||||||
|
if (!opts.raw)
|
||||||
|
{
|
||||||
|
return doc.text_cleaned;
|
||||||
|
}
|
||||||
|
return doc.text_raw;
|
||||||
|
}()};
|
||||||
string::const_iterator begin{text.begin()};
|
string::const_iterator begin{text.begin()};
|
||||||
string::const_iterator end{text.end()};
|
string::const_iterator end{text.end()};
|
||||||
auto begin_text{begin};
|
auto begin_text{begin};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user