@@ -134,7 +134,31 @@ static void splitSearchTokens(QCString &title,IntVector &indices)
134
134
for (size_t si=0 ; si<title.length (); si++)
135
135
{
136
136
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
138
162
{
139
163
title.at (di)=c;
140
164
di++;
@@ -504,9 +528,11 @@ void createJavaScriptSearchIndex()
504
528
QCString title = filterTitle (sectionInfo->title ());
505
529
IntVector tokenIndices;
506
530
splitSearchTokens (title,tokenIndices);
531
+ // printf("split(%s)=(%s) %zu\n",qPrint(sectionInfo->title()),qPrint(title),tokenIndices.size());
507
532
for (int index : tokenIndices)
508
533
{
509
534
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 ()));
510
536
}
511
537
}
512
538
}
@@ -779,7 +805,7 @@ static void writeJavasScriptSearchDataPage(const QCString &baseName,const QCStri
779
805
}
780
806
else if (si)
781
807
{
782
- name = convertToXML ( filterTitle ( si->title () ));
808
+ name = convertTitleToHtml (si-> definition (), si->fileName (),si-> lineNr (),si-> title ( ));
783
809
found = true ;
784
810
}
785
811
if (!found) // fallback
0 commit comments