diff --git a/url.bs b/url.bs index 7d6ed2dd..1f4af568 100644 --- a/url.bs +++ b/url.bs @@ -1742,81 +1742,70 @@ string input, optionally with a base URL base, opti
Set url's scheme to "file",
- and then, switching on c:
+
Set url's scheme to "file".
-
If base is non-null and base's
- scheme is "file", set
- url's host to
- base's host,
- url's path to
- base's path, and
- url's query to
- base's query.
+
If c is "/" or "\", then:
-
/"
- \"
- If c is "\", syntax violation.
Set state to file slash state.
?"
- If base is non-null and base's
- scheme is "file", set
- url's host to
- base's host,
- url's path to
- base's path,
- url's query to the empty string,
- and state to query state.
+
Otherwise, if base is non-null and base's scheme is
+ "file", switch on c:
+
+
Set url's host to base's host, + url's path to base's path, and + url's query to base's query. + +
?"
+ Set url's host to base's host, + url's path to base's path, + url's query to the empty string, and state to + query state. + +
#"
+ Set url's host to base's host, + url's path to base's path, + url's query to base's query, + url's fragment to the empty string, and state to + fragment state. + +
If at least one of the following is true -
#"
- If base is non-null and base's
- scheme is "file", set
- url's host to
- base's host,
- url's path to
- base's path,
- url's query to
- base's query,
- url's fragment to the empty string,
- and state to fragment state.
+
c and the first code point of remaining are not a + Windows drive letter +
remaining consists of one code point +
remaining's second code point is not "/",
+ "\", "?", or "#"
+
If base is non-null, base's scheme
- is "file", and at least one of the following is true
-
-
c and the first code point of remaining are not a - Windows drive letter -
remaining consists of one code point -
/",
- "\", "?", or "#"
- then set url's host to - base's host, - url's path to - base's path, and then shorten - url's path. +
then set url's host to base's host, + url's path to base's path, and then + shorten url's path. -
This is a (platform-independent) Windows drive letter quirk. +
This is a (platform-independent) Windows drive letter quirk. -
Otherwise, if base is non-null and base's
- scheme is "file", syntax violation.
+
Otherwise, syntax violation. -
Set state to path state, and decrease pointer - by one. -
Set state to path state, and decrease pointer by one. +
Otherwise, set state to path state, and decrease pointer by + one. +