Re: [whatwg/url] Clarify how URL strings map to URL components via table (#489)

@domenic commented on this pull request.



> @@ -1114,6 +1114,50 @@ refers to as well as its origin. It is important that these are cached as the <a
 be removed from the <a>blob URL store</a> between parsing and fetching, while fetching will still
 need to succeed.
 
+<div class=example id=example-url-components>
+ <p>The following table lists how <a>valid URL strings</a>, when <a lt="URL parser">parsed</a>, map
+ to a <a for=/>URL</a>'s components. Username and password are left as exercise for the reader.

"left as an exercise for the reader" is a bit misleading because it implies that the reader might have to do some work. Instead I'd state this as something like

> Username and password are omitted from the table; in all the examples given they are the empty string. Similarly for blob URL entry, which is null in all the examples given.

> +   <td>"<code>localhost</code>"
+   <td>8000
+   <td>« "<code>search</code>" »
+   <td>"<code>q=text</code>"
+   <td>"<code>hello</code>"
+   <td>unset
+  <tr>
+   <td><code>urn:isbn:9780307476463</code>
+   <td>"<code>urn</code>"
+   <td>null
+   <td>null
+   <td>« "<code>isbn:9780307476463</code>" »
+   <td>null
+   <td>null
+   <td>set
+ </table>

A file: URL might be helpful for people to see, and could also allow illustrating multiple path segments.

-- 
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/489#pullrequestreview-405137468

Received on Monday, 4 May 2020 16:15:41 UTC