Skip to content

Commit

Permalink
highlight text fix (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
gecBurton authored Dec 13, 2024
1 parent 15723b2 commit 2d264a1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions core/templates/core/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@
console.log('Page loaded');

page.getTextContent().then(function(textContent) {
// Loop through text items to find the text you want to highlight
textContent.items.forEach(function(item) {
if (item.str.includes('{{ embedding.text|stringformat:'r' }}')) {
console.log("found!");
} else {
console.log(item + " isnt relevant");
}
});
// Loop through text items to find the text you want to highlight
textContent.items.forEach(function(item) {
if (item.str.includes("{{ embedding.text|stringformat:'r' }}")) {
console.log("found!");
} else {
console.log(item + " isnt relevant");
}
});
}
);

const scale = 0.5;
const viewport = page.getViewport({
Expand Down

0 comments on commit 2d264a1

Please sign in to comment.