Closed 1fifoto closed 2 years ago
Checked in first pass of 689 and merged into master.
But there is a nasty problem that I can't understand what is going wrong. Multiple searches (of the same word?) cause the search results to become garbled and longer & longer.
And sometimes the server gets messed up and generates an error. I have no idea what is going wrong and could use your help isolating the root cause.
Observations on the problem noted in the previous comment ...
I seem to be able to get repeatable results when I restart the server, otherwise, there seems to be a random component. Operation of the highlighting in the Help topic seems correct and stable. The blurb of the first lookup after server re-start appears correct. The blurb of the second lookup appears to have significant problems. Perhaps it is both first and second terms that drive the blurb contents and get highlighted on the second use of Help Lookup. Also, I observe semi-random corruption in the blurb. It almost seems to be inserted snippets of JavaScript memory contents ... a lot of % signs followed by dights, color codes.
These observations lead to a bit of speculation. Perhaps the problem is on the server side. Perhaps something is not getting initialized properly on subsequent invocations of the server side of the Help Lookup sequence. The problem seems to be blurb related and at least not directly related to the highlighting of terms in the Help topic. What were the recent server-side changes in that blurb area ? How is it possible that un-initialized memory is getting mapped into the blurb content ?
Neede to clone lunr page info so that updates are no saved back into the page info, change from
let pageMatch = lunr_pages.filter((page) => page.href === hit.ref)[0];
to
let pageMatch = JSON.parse(JSON.stringify(lunr_pages.filter((page) => page.href === hit.ref)[0]));
Merged into master, waiting on closing until more testing by Mike.
Merged into master again, closing
I observed a problem with repeats of the same sentence in the blurb. It is possible that the May 17 change did not fully repair all of the (potentially multiple) symptoms that were being observed at that time. Re-opening this issue.
To recreate the problem:
I have the notion that the blurb should contain no more copies of the same sentence than appear in the original document file. In this case, the sentence appears once in the original .md file but appears 6 times in the blurb. So, while perhaps I am missing something, I think that this is enough of a problem to reopen this issue.
The above comment has been fixed and released to master, closing
Highlight the search term in the linked page as illustrated below.
As currently implemented, a Help lookup on the term "AutoSave" produces a "Help lookup for terms 'AutoSave' modal" with "Found 8 matching documents". The first hit is a link to the Help document (entry, article, topic) for AutoSave. If the user clicks on this link, a new browser tab containing the unmodified HTML of that page will open. It is desired that, on this page, every appearance of the search term will be highlighted. This example shows such highlighting as generated by the "Find on page" (ctrl-f) feature of the MS Edge browser. Alternate implementations with similar but not necessarily identical results should be considered.