Skip to content

Commit d1252c5

Browse files
committed
Missing items in doxygen internal search
When having the simple file: ``` \mainpage The main page \page pg1 The first page \section sect_1_1 first section first page \section sect_1_2 second section first page \page pg2 The second page \section sect_2_1 first section second page \section sect_2_2 second section second page ``` and doing a "normal" internal doxygen search for the word `second` we get a.o. ``` first section second page The second page second section first page second section second page ``` but when searching for `second page` we get ``` first section second page The second page ``` so we are missing the reference to ``` second section second page ``` this is due to the filtering of the words in the string and omitting double words.
1 parent 9b51550 commit d1252c5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/searchindex_js.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,24 +121,16 @@ static void splitSearchTokens(QCString &title,IntVector &indices)
121121
// create a list of start positions within title for
122122
// each unique word in order of appearance
123123
int p=0,i;
124-
StringSet wordsFound;
125124
while ((i=title.find(' ',p))!=-1)
126125
{
127126
std::string word = title.mid(p,i-p).str();
128-
if (wordsFound.find(word)==wordsFound.end())
129-
{
130-
indices.push_back(p);
131-
wordsFound.insert(word);
132-
}
127+
indices.push_back(p);
133128
p = i+1;
134129
}
135130
if (p<static_cast<int>(title.length()))
136131
{
137132
std::string word = title.mid(p).str();
138-
if (wordsFound.find(word)==wordsFound.end())
139-
{
140-
indices.push_back(p);
141-
}
133+
indices.push_back(p);
142134
}
143135
}
144136

0 commit comments

Comments
 (0)