Re: [whatwg/url] Fix Windows drive letter handling in the file slash state (#343)

rmisev commented on this pull request.



> @@ -1834,19 +1862,11 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti
        <dd>
         <ol>
          <li>
-          <p>If at least one of the following is true
-
-          <ul class=brief>
-           <li><p><a>remaining</a> consists of zero code points
-           <li><p><a>c</a> and the first code point of <a>remaining</a> are not a
-           <a>Windows drive letter</a>
-           <li><p><a>remaining</a> has at least 2 code points and <a>remaining</a>'s second code
-           point is <em>not</em> U+002F (/), U+005C (\), U+003F (?), or U+0023 (#)
-          </ul>
-
-          <p>then set <var>url</var>'s <a for=url>host</a> to <var>base</var>'s <a for=url>host</a>,
-          <var>url</var>'s <a for=url>path</a> to a copy of <var>base</var>'s <a for=url>path</a>,
-          and then <a>shorten</a> <var>url</var>'s <a for=url>path</a>.
+          <p>If the substring from <var>pointer</var> in <var>input</var> does not
+          <a>start with a Windows drive letter</a>, then set <var>url</var>'s <a for=url>host</a> to

Yes, the substring runs until the end of the string [like in the JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) when indexEnd is omitted.
@annevk opened the issue https://github.com/whatwg/infra/issues/152 to define substring usage.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/343#discussion_r139360600

Received on Monday, 18 September 2017 08:24:56 UTC