Hacker News new | ask | show | jobs
by ritinkar 1320 days ago
If you're asking how the "Highlights" feature works, its using something called text fragments.

When the original text changes then the highlight is dead. Meaning you can still discuss it, but it will no longer be highlighted in the window.

You can read more about text fragments here - https://web.dev/text-fragments/

1 comments

That seems like it would be a problem for something like a documentation site, where even small changes to the text would break the entire highlight. Maybe you can implement something via diff to maintain a fuzzier anchor.