vuuvv / fizzler

Automatically exported from code.google.com/p/fizzler
GNU General Public License v3.0
0 stars 0 forks source link

Support general sibling combinator #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The general sibling combinator is made of the "tilde" (U+007E, ~) character
that separates two sequences of simple selectors. The elements represented
by the two sequences share the same parent in the document tree and the
element represented by the first sequence precedes (not necessarily
immediately) the element represented by the second one.

Example:

  h1 ~ pre

represents a pre element following an h1. It is a correct and valid, but
partial, description of:

<h1>Definition of the function a</h1>
<p>Function a(x) has to be applied to all figures in the table.</p>
<pre>function a(x) = 12x/13.5</pre>

Original issue reported on code.google.com by azizatif on 28 Apr 2009 at 12:16

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 28 Apr 2009 at 12:16

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 28 Apr 2009 at 12:52

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 28 Apr 2009 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 1 May 2009 at 3:23

GoogleCodeExporter commented 8 years ago
I *think* these are correct for our test document:

[Test]
public void General_Sibling_Combinator()
{
    Assert.AreEqual(1, SelectList("div ~ form").Count);
    Assert.AreEqual(2, SelectList("a ~ span").Count);
}

Original comment by info%colinramsay.co.uk@gtempaccount.com on 12 May 2009 at 12:13

GoogleCodeExporter commented 8 years ago
Unit tests and implementation added in r194.

Original comment by info%colinramsay.co.uk@gtempaccount.com on 12 May 2009 at 10:57