css3-selectors

changeset 67:cc0eaffb6660

Handle the '~' general sibling combinator
author Emanuele Aina <em@nerd.ocracy.org>
date Mon Nov 10 23:02:24 2008 +0100 (20 months ago)
parents 3d6bd01688c6
children 18d0c408131f
files Css3SelectorExperiment.cs
line diff
     1.1 --- a/Css3SelectorExperiment.cs	Mon Nov 10 22:50:07 2008 +0100
     1.2 +++ b/Css3SelectorExperiment.cs	Mon Nov 10 23:02:24 2008 +0100
     1.3 @@ -36,6 +36,7 @@
     1.4                  case " ": return "//";
     1.5                  case ">": return "/";
     1.6                  case "+": return "/following-sibling::*[1]/self::";
     1.7 +                case "~": return "/following-sibling::";
     1.8              }
     1.9              throw new Exception();
    1.10          }
    1.11 @@ -203,7 +204,7 @@
    1.12              // attribute value match
    1.13              new[]{@"^\[\s*([^~\|=\s]+)\s*(([~\|]?=)\s*(.+))?\]", "Attr"},
    1.14              // adjacency/direct descendance
    1.15 -            new[]{@"^\s*([>+\s])\s*", "Combinator"},
    1.16 +            new[]{@"^\s*([>+\~\s])\s*", "Combinator"},
    1.17              // rules union 
    1.18              new[]{@"^\s*,", "Comma"}
    1.19          };

To download these repositories, get Mercurial and then type something like:

hg clone http://techn.ocracy.org/repository-name/

You can also click the "zip" or "gz" links to get an archive of the latest revision without installing anything.

The change logs of the repositories are aggregated at techn.ocracy.org/planet.

We have also some darcs repositories at techn.ocracy.org/darcs.