Re: [whatwg/url] Clarify double-dot path segment parsing (#482)

@domenic commented on this pull request.



> -       <li><p>If <var>buffer</var> is a <a>double-dot path segment</a>, <a>shorten</a>
-       <var>url</var>'s <a for=url>path</a>, and then if neither <a>c</a> is U+002F (/), nor
-       <var>url</var> <a>is special</a> and <a>c</a> is U+005C (\), <a for=list>append</a>
-       the empty string to <var>url</var>'s <a for=url>path</a>.
+       <li>
+        <p>If <var>buffer</var> is a <a>double-dot path segment</a>, then:
+
+        <ol>
+         <li><p><a>Shorten</a> <var>url</var>'s <a for=url>path</a>.
+
+         <li>
+          <p>If neither <a>c</a> is U+002F (/), nor <var>url</var> <a>is special</a> and <a>c</a> is
+          U+005C (\), <a for=list>append</a> the empty string to <var>url</var>'s
+          <a for=url>path</a>.
+
+          <p class="note no-backref">Usually <a>c</a> is U+002F (/) at this point.

Empty is often a special case, at least in human's minds. I agree for computers they are not different.

-- 
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/482#discussion_r415980423

Received on Monday, 27 April 2020 16:52:01 UTC