Re: [whatwg/url] Use empty host for file URL's (#260)

annevk commented on this pull request.

The other thing I'm wondering about is if we should add some kind of explanatory text. That file URLs can have empty or non-opaque hosts, non-file-special URLs can have non-empty-non-opaque hosts, and non-special URLs can have empty, opaque, or null hosts. Such a note should probably go where we define the host field of URLs.

> @@ -383,7 +385,7 @@ up to three <a>ASCII digits</a> per sequence, each representing a decimal number
 
      XXX should we define the format inline instead just like STD 66? -->
 
-<p>An <dfn export>valid opaque-host string</dfn> must be zero or more <a>URL units</a> or:
+<p>An <dfn export>valid opaque-host string</dfn> must be one or more <a>URL units</a> or:

Can you change "An" to "A" here while we're changing this? I can also do it before merging.

> @@ -768,7 +770,8 @@ no purpose other than being a location the algorithm can jump to.
  <a>IPv6 serializer</a> on <var>host</var>,
  followed by "<code>]</code>".
 
- <li><p>Otherwise, <var>host</var> is a <a>domain</a> or <a>opaque host</a>, return <var>host</var>.
+ <li><p>Otherwise, <var>host</var> is a <a>domain</a>, an <a>opaque host</a>, or an <a>empty
+ host</a>, return <var>host</var>.

I think it reads more naturally if you leave out the "an". So "A domain, opaque host, or empty host".

> @@ -1172,9 +1175,10 @@ switching on <a>base URL</a>'s <a for=url>scheme</a>:
  <dd><p>a <a>path-relative-scheme-less-URL string</a>
  <dt>"<code>file</code>"
  <dd><p>a <a>scheme-relative-file-URL string</a>
- <dd><p>a <a>path-absolute-URL string</a> if <a>base URL</a>'s <a for=url>host</a> is null
+ <dd><p>a <a>path-absolute-URL string</a> if <a>base URL</a>'s <a for=url>host</a> is an <a>empty
+ host</a>

No newlines inside phrasing/inline elements.

>             <a>validation error</a>.
 
-           <li><p>Set <var>url</var>'s <a for=url>host</a> to null and replace the second
+           <li><p>Set <var>url</var>'s <a for=url>host</a> to the empty string and replace the second

This is >100 columns. "second" needs to go to the next line.

-- 
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/260#pullrequestreview-23976295

Received on Monday, 27 February 2017 12:54:12 UTC