dbf64ebe4a5118f6ce418f0beb42fbd20821113a chmalee Fri Oct 28 17:15:59 2022 -0700 Fix erroneous trix prefixing problem. When looking for snippets we use a larger trixPrefixSize for a speedup, but I was forgetting to reset the size when opening up the next trix index later on. Fix missing highlights on search results page. refs #26963 diff --git src/hg/cgilib/cartJson.c src/hg/cgilib/cartJson.c index 748a49f..5d90342 100644 --- src/hg/cgilib/cartJson.c +++ src/hg/cgilib/cartJson.c @@ -113,30 +113,31 @@ // this is magic to tell the browser to make the // composite and this subTrack visible if (tdb && tdb->parent) { if (tdbIsSuperTrackChild(tdb)) jsonWriteStringf(jw, "extraSel", "%s=show&", tdb->parent->track); else { // tdb is a subtrack of a composite or a view jsonWriteStringf(jw, "extraSel", "%s_sel=1&%s_sel=1&", trackName, tdb->parent->track); } } jsonWriteString(jw, "hgFindMatches", encMatches); jsonWriteString(jw, "posName", htmlEncode(pos->name)); + jsonWriteString(jw, "highlight", pos->highlight); jsonWriteBoolean(jw, "canonical", pos->canonical); if (pos->description) { stripString(pos->description, "\n"); jsonWriteString(jw, "description", stripAnchor(pos->description)); } jsonWriteObjectEnd(jw); // end one match } jsonWriteListEnd(jw); // end matches if (table->searchTime >= 0) jsonWriteNumber(jw, "searchTime", table->searchTime); jsonWriteObjectEnd(jw); // end one table } } jsonWriteListEnd(jw); // end positionMatches