Re: [whatwg/encoding] Add some minor clarifications. (#244)

@annevk commented on this pull request.

Thanks Andreu for the quick fix!

> @@ -201,10 +201,17 @@ an I/O queue "<code>&amp;#128169; hello world</code>". The next item to be read
 <p>To <dfn for="from I/O queue">convert</dfn> an <a for=/>I/O queue</a> <var>ioQueue</var> into a
 <a for=/>list</a>, <a>string</a> or <a>byte sequence</a>, return the result of
 <a for="I/O queue">reading</a> an indefinite number of <a for=list>items</a> from
-<var>ioQueue</var>. To <dfn for="to I/O queue">convert</dfn> a <a for=/>list</a>, <a>string</a> or
-<a>byte sequence</a> <var>input</var> into an <a for=/>I/O queue</a>, return an
-<a for=/>I/O queue</a> containing the <a for=list>items</a> in <var>input</var>, in order, followed
-by <a>end-of-queue</a>.
+<var>ioQueue</var>.
+
+<p>To <dfn for="to I/O queue">convert</dfn> a <a for=/>list</a>, <a>string</a> or
+<a>byte sequence</a> <var>input</var> into an <a for=/>I/O queue</a>, run these steps:
+
+<ol>
+ <li><p>Assert: <var>input</var> does not <a for=list>contain</a> <a>end-of-queue</a>.

This needs a conditional for input being a list. Or we do it similar to prepend and say "a list not containing end-of-queue" in the algorithm "header".

>  
- <li><p>If <var>buffer</var> does not match 0xEF 0xBB 0xBF, <a>prepend</a> <var>buffer</var> to
- <var>ioQueue</var>.
+ <li><p>If <var>buffer</var> matches 0xEF 0xBB 0xBF, <a for="I/O queue">read</a> three bytes from

Slight preference for using "is" here over "matches". As well ", then ...".

-- 
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/encoding/pull/244#pullrequestreview-516663059

Received on Monday, 26 October 2020 10:58:57 UTC