Inline code snippets are often unhelpful or irrelevant. Some specific issues I've noticed:
- Snippets return a partial substring match, making the snippets irrelevant
- Snippets return the comments in a code file, not the actual code
- Snippets return code from different languages than the query requests, also making them irrelevant
Example 1 (search for "plain js"):
Issues here:
- All snippets match the substring "plain js" in a larger string
- Last two snippets are just comments in the full code
- No JavaScript code is returned anywhere
Example 2 (search for "html pre"):
Issues here:
- Snippets match the substring "html pre" in a larger string
- First snippet is from a comment
- No HTML returned anywhere
I would expect to happen for:
Example 1: Return code snippets of plain/vanilla JavaScript code
Example 2: Return code snippets of the HTML pre
element