@@ -134,7 +134,31 @@ static void splitSearchTokens(QCString &title,IntVector &indices)
134134 for (size_t si=0 ; si<title.length (); si++)
135135 {
136136 char c = title.at (si);
137- if (isId (c) || c==' :' ) // add "word" character
137+ if (c==' @' || c==' \\ ' ) // skip over special commands
138+ {
139+ title.at (di)=' ' ;
140+ if (si<title.length ()-1 )
141+ {
142+ c = title.at (++si);
143+ while (si<title.length () && (isId (c) || c==' :' )) c = title.at (++si);
144+ --si;
145+ }
146+ }
147+ else if (c==' <' ) // skip over html tags
148+ {
149+ if (si<title.length ()-1 )
150+ {
151+ for (size_t tsi = si; tsi<title.length (); ++tsi)
152+ {
153+ if (title.at (tsi)==' >' )
154+ {
155+ si=tsi;
156+ break ;
157+ }
158+ }
159+ }
160+ }
161+ else if (isId (c) || c==' :' ) // add "word" character
138162 {
139163 title.at (di)=c;
140164 di++;
@@ -504,9 +528,11 @@ void createJavaScriptSearchIndex()
504528 QCString title = filterTitle (sectionInfo->title ());
505529 IntVector tokenIndices;
506530 splitSearchTokens (title,tokenIndices);
531+ // printf("split(%s)=(%s) %zu\n",qPrint(sectionInfo->title()),qPrint(title),tokenIndices.size());
507532 for (int index : tokenIndices)
508533 {
509534 g_searchIndexInfo[SEARCH_INDEX_ALL].add (SearchTerm (title.mid (index),sectionInfo.get ()));
535+ g_searchIndexInfo[SEARCH_INDEX_PAGES].add (SearchTerm (title.mid (index),sectionInfo.get ()));
510536 }
511537 }
512538 }
@@ -779,7 +805,7 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
779805 }
780806 else if (si)
781807 {
782- name = convertToXML ( filterTitle ( si->title () ));
808+ name = convertTitleToHtml (si-> definition (), si->fileName (),si-> lineNr (),si-> title ( ));
783809 found = true ;
784810 }
785811 if (!found) // fallback
0 commit comments