Skip to content

Add text fragments to quarto-search.js items#14003

Open
vezwork wants to merge 1 commit intomainfrom
feature/quarto-search-js-text-fragments
Open

Add text fragments to quarto-search.js items#14003
vezwork wants to merge 1 commit intomainfrom
feature/quarto-search-js-text-fragments

Conversation

@vezwork
Copy link

@vezwork vezwork commented Feb 6, 2026

Description

Adds text fragments to items in search. Example video:

Kapture.2026-02-06.at.12.51.59.mp4

I have attempted to write this code quite defensively so that it will not break things. Its not quite the ideal place for this code since this piece of code can be called multiple time for a single item, but it gets the job done.

Text fragments are well supported and apparently browsers will fall back to id linking if the text fragment is not supported or found (worked in my testing in chrome and safari and firefox on Desktop MacOS Tahoe, e.g. https://en.wikipedia.org/wiki/Dog#Domestication:~:text=blablabla).

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Feb 6, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@vezwork vezwork requested review from cderv and cscheid February 6, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants