madskristensen/zencoding — pull request #29 by am11 (2014-01-26 16:02:00+00:00)
Title: Tokens: Revamped BuildControlTree logic

* Revamped BuildControlTree logic.
* Added complex counter test.
* Version number bumped 1.2.
* Copyright year set to 2014.

More fixes for #28.

The complex syntax such as:

```html
ul[data-bind="foreach:customers"]>li*3>span{Caption $$}*4+input[type=text data-bind="value:$$"]+ul[data-bind="foreach:customers"]>li*4>span{Caption $$}+input[type=text data-bind="value:$$"]
```

Should have a proper sub-counters:

```html

Caption 01
Caption 02
Caption 03
Caption 04

Caption 01

Caption 02

Caption 03

Caption 04

Caption 01
Caption 02
Caption 03
Caption 04

Caption 01

Caption 02

Caption 03

Caption 04

Caption 01
Caption 02
Caption 03
Caption 04

Caption 01

Caption 02

Caption 03

Caption 04

```

For more tests, click Try it yourself at http://docs.emmet.io/ and compare the results with this implementation.