748b06ac95ff2a3957be3845bd3594984e3cc3cf chmalee Wed Aug 17 19:21:48 2022 -0700 Rename test cgi to official name. Always search everything, only show categories that have matches in the result list. Add /search endpoint to hubApi, add code to search help docs in hgSuggest but don't call it yet in autoComplete.js. Minor fixups so search result links work correctly. Fixing up old programs that call hgPositionsFind diff --git src/inc/trix.h src/inc/trix.h index 7d8a060..2fd3938 100644 --- src/inc/trix.h +++ src/inc/trix.h @@ -92,17 +92,23 @@ int trixSearchResultCmp(const void *va, const void *vb); /* Compare two trixSearchResult in such a way that most relevant searches tend to be first. */ extern bool wordMiddleChars[]; /* Characters that may be part of a word. */ extern bool wordBeginChars[]; void initCharTables(); /* Initialize tables that describe characters. */ char *skipToWord(char *s); /* Skip to next word character. Return NULL at end of string. */ char *skipOutWord(char *start); /* Skip to next non-word character. Returns empty string at end. */ +void addSnippetForResult(struct trixSearchResult *tsr, struct trix *trix); +/* Find the snippet for a search result */ + +void initSnippetIndex(struct trix *trix); +/* Setup what we need to obtain snippets */ + void addSnippetsToSearchResults(struct trixSearchResult *tsrList, struct trix *trix); #endif //ndef TRIX_H