Strange results searching for xyz in three.js
Closed this issue · 4 comments
Searching for xyz
in mrdoob/three.js leads to some strange results:
- in https://www.github.com/mrdoob/three.js/issues/9339#issuecomment-312527206 the whole source seems to be highlighted
- in mrdoob/three.js#9092 no comment is highlighted, the
xyz
can be found in the source block in the response 14
Observation: The xyz
is found in the source blocks in both cases.
- the whole source seems to be highlighted
Fixed (class=highlight
was already used in the GitHub markdown, changed to search-highlight
on our end)
no comment is highlighted
The issue is loaded on a second page (by pressing Load more issues). The page loading does not submit the required Accept header, therefore text match information is missing for subsequent pages.
Another similar situation: CSM in three.js returns several matches into https://www.github.com/mrdoob/three.js/issues/18934
Responses 4 and 5 are not highlighted in spite of them containing the CSM (and the word itself is highlighted when viewing the comment).
It seems in this case a little can be done, as GitHub API returns the two matches only:
The fact they are highlighted in-line is a side effect of the highlights being done brute force, with no respect to what highlight comes from where.