Skip to content

Commit

Permalink
Merge pull request #177 from zcorpan/fix-166
Browse files Browse the repository at this point in the history
Fix #166
  • Loading branch information
yoavweiss committed May 21, 2014
2 parents 1f44f07 + 8013717 commit d4b19ff
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 180 deletions.
42 changes: 33 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,23 @@ Parsing a <code>srcset</code> Attribute</h4>
<a>Collect a sequence of characters</a> that are not
<a>space characters</a>, and let that be <var>url</var>.

<li>
Let <var>descriptors</var> be the empty string.

<li>
If <var>url</var> ends with a U+002C COMMA character
(,), remove that character from <var>url</var> and let
<var>descriptors</var> be the empty string. Otherwise,
(,), follow these substeps:

<ol>
<li>
Remove all trailing U+002C COMMA characters from <var>url</var>.

<li>
If <var>url</var> is empty, then jump to
the step labeled <i title>splitting loop</i>.
</ol>

Otherwise,
follow these substeps:

<ol>
Expand All @@ -670,10 +683,26 @@ Parsing a <code>srcset</code> Attribute</h4>
parser</i>.

<li>
<i title>Descriptor collection loop</i>:
<a>Collect a sequence of characters</a>
that are not U+002C COMMA characters
(,), and let that be
<var>descriptors</var>.
(,) or U+0028 LEFT PARENTHESIS ((),
and append the result to <var>descriptors</var>.

<li>
If the character at <var>position</var> is a U+002C COMMA character,
jump to the step labeled <i title>skip comma</i>.

<li>
<a>Collect a sequence of characters</a> that are not
U+0029 RIGHT PARENTHESIS ()) and append the result to <var>descriptors</var>.

<li>
Jump to the step labeled <i title>descriptor collection loop</i>.

<li>
<i title>Skip comma</i>: Advance <var>position</var> to the next character in
<var>input</var>.
</ol>

<li>
Expand All @@ -685,11 +714,6 @@ Parsing a <code>srcset</code> Attribute</h4>
<var>input</var>, then jump to the step labeled
<i title>descriptor parser</i>.

<li>
Advance <var>position</var> to the next character in
<var>input</var> (skipping past the U+002C COMMA
character (,) separating this candidate from the next).

<li>
Return to the step labeled <i title>splitting loop</i>.

Expand Down
Loading

0 comments on commit d4b19ff

Please sign in to comment.