WICG / scroll-to-text-fragment

Proposal to allow specifying a text snippet in a URL fragment
Other
589 stars 42 forks source link

[Spec] Factor out parsing logic #85

Closed bokand closed 4 years ago

bokand commented 4 years ago

This is a small cleanup that makes it a bit easier to follow the logic for finding a Range from a text directive by splitting out the logic that parses the string into its individual components.

Also renames Find a target text to Find a matching Range to more clearly indicate that the algorithm turns a text directive into a Range in the Document.

This is a first step in fixing and improving some of the issues in the tree walking algorithm as part of #73.