diff --git a/spec.bs b/spec.bs index 3287120..4dd6b88 100644 --- a/spec.bs +++ b/spec.bs @@ -641,11 +641,11 @@ To change state given a [=constructor string parser=] |parser|, a [=c 1. If |parser|'s [=constructor string parser/state=] is not "`init`", not "`authority`", and not "`done`", then set |parser|'s [=constructor string parser/result=][|parser|'s [=constructor string parser/state=]] to the result of running [=make a component string=] given |parser|. 1. If |parser|'s [=constructor string parser/state=] is not "`init`" and |new state| is not "`done`", then: - 1. It |parser|'s [=constructor string parser/state=] is "`protocol`", "`authority`", "`username`", or "`password`"; |new state| is "`port`", "`pathname`", "`search`", or "`hash`"; and |parser|'s [=constructor string parser/result=]["{{URLPatternInit/hostname}}"] does not [=map/exist=], then set |parser|'s [=constructor string parser/result=]["{{URLPatternInit/hostname}}"] to the empty string. - 1. It |parser|'s [=constructor string parser/state=] is "`protocol`", "`authority`", "`username`", "`password`", "`hostname`", or "`port`"; |new state| is "`search`", or "`hash`"; and |parser|'s [=constructor string parser/result=]["{{URLPatternInit/pathname}}"] does not [=map/exist=], then: + 1. If |parser|'s [=constructor string parser/state=] is "`protocol`", "`authority`", "`username`", or "`password`"; |new state| is "`port`", "`pathname`", "`search`", or "`hash`"; and |parser|'s [=constructor string parser/result=]["{{URLPatternInit/hostname}}"] does not [=map/exist=], then set |parser|'s [=constructor string parser/result=]["{{URLPatternInit/hostname}}"] to the empty string. + 1. If |parser|'s [=constructor string parser/state=] is "`protocol`", "`authority`", "`username`", "`password`", "`hostname`", or "`port`"; |new state| is "`search`", or "`hash`"; and |parser|'s [=constructor string parser/result=]["{{URLPatternInit/pathname}}"] does not [=map/exist=], then: 1. If |parser|'s [=constructor string parser/protocol matches a special scheme flag=] is true, then set |parser|'s [=constructor string parser/result=]["{{URLPatternInit/pathname}}"] to "`/`". 1. Otherwise, set |parser|'s [=constructor string parser/result=]["{{URLPatternInit/pathname}}"] to the empty string. - 1. It |parser|'s [=constructor string parser/state=] is "`protocol`", "`authority`", "`username`", "`password`", "`hostname`", "`port`", or "`pathname`"; |new state| is "`hash`"; and |parser|'s [=constructor string parser/result=]["{{URLPatternInit/search}}"] does not [=map/exist=], then set |parser|'s [=constructor string parser/result=]["{{URLPatternInit/search}}"] to the empty string. + 1. If |parser|'s [=constructor string parser/state=] is "`protocol`", "`authority`", "`username`", "`password`", "`hostname`", "`port`", or "`pathname`"; |new state| is "`hash`"; and |parser|'s [=constructor string parser/result=]["{{URLPatternInit/search}}"] does not [=map/exist=], then set |parser|'s [=constructor string parser/result=]["{{URLPatternInit/search}}"] to the empty string. 1. Set |parser|'s [=constructor string parser/state=] to |new state|. 1. Increment |parser|'s [=constructor string parser/token index=] by |skip|. 1. Set |parser|'s [=constructor string parser/component start=] to |parser|'s [=constructor string parser/token index=].