WICG / scroll-to-text-fragment

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

Should FragmentDirective know about TextDirective? #220

Closed annevk closed 10 months ago

annevk commented 1 year ago

I guess currently UnknownDirective is a superset of TextDirective but the current setup allows for them to get out of sync which doesn't seem desirable.

bokand commented 10 months ago

@annevk I'm not sure what you mean by "allows them to get out of sync"? But I do see it's wrong that UnknownDirective covers TextDirective. b6381a1 addresses it (as well as making the grammar non-normative) by making the two disjoint:

TextDirective ::= "text="CharacterString
UnknownDirective ::= CharacterString - TextDirective
CharacterString ::= (ExplicitChar | PercentEncodedByte)*

will that change resolve this issue?