dannyvankooten/AltoRouter — pull request #1 by Deebster (2012-08-16 11:15:16+00:00)
Title: Fixed generate() replacing leaving [s, made empty optional parameters blank

```php
'/page-[i:pageNum]';
$pageNum = 2;
```
was generating '/page-[1' instead of '/page-1'.

The $pre test fixes this.

-------------------
```php
'/[:catName]/[:pagination]?';
$catName = 'foobars';
```
was generating '/foobars/[:pagination]?' instead of '/foobars/'.

The $optional test fixes this (it doesn't remove the preceeding character, which might be desired)