Skip to content

Commit

Permalink
with tag fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
agopaul authored and speedmax committed Aug 11, 2010
1 parent e4d7f1a commit dcdce3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h2o/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,14 @@ class With_Tag extends H2o_Node {
public $position;
private $variable, $shortcut;
private $nodelist;
private $syntax = '/^([\w]+(:?\.[\w]+)?)\s+as\s+([\w]+(:?\.[\w]+)?)$/';
private $syntax = '/^([\w]+(:?\.[\w\d]+)*)\s+as\s+([\w]+(:?\.[\w\d]+)?)$/';

function __construct($argstring, $parser, $position = 0) {
if (!preg_match($this->syntax, $argstring, $matches))
throw new TemplateSyntaxError('Invalid with tag syntax');

# extract the long name and shortcut
list($this->variable, $this->shortcut) = $matches;
list(,$this->variable, ,$this->shortcut) = $matches;
$this->nodelist = $parser->parse('endwith');
}

Expand Down

0 comments on commit dcdce3a

Please sign in to comment.