whatwg / url

URL Standard
https://url.spec.whatwg.org/
Other
527 stars 137 forks source link

Redundant condition in #fragment-state #777

Closed rshadr closed 1 year ago

rshadr commented 1 year ago

https://url.spec.whatwg.org/commit-snapshots/eee49fdf4f99d59f717cbeb0bce29fda930196d4/#fragment-state

fragment state

    If c is not the EOF code point, then:​ 

At this point c can't be EOF, since the basic URL parser says:

  1. Keep running the following state machine by switching on state. If after a run pointer points to the EOF code point, go to the next step. Otherwise, increase pointer by 1 and continue with the state machine.
annevk commented 1 year ago

If the input is the empty string and state override is the fragment state I think you hit this. Try removing it in https://github.com/jsdom/whatwg-url and see what happens.