Skip to content

Commit

Permalink
Allow a partial to appear as the first character of a partial
Browse files Browse the repository at this point in the history
(auto-add a space to the start of each partial, as a :partial reference must be preceded by a word-break, space or '>' character)
  • Loading branch information
kolber committed Jan 7, 2010
1 parent d26f2ee commit 53a2c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/parsers/template-parser.inc.php
Expand Up @@ -12,7 +12,7 @@ static function get_partial_template($name) {

foreach(self::$partials as $partial) {
if(preg_match('/([^\/]+?)\.[\w]+?$/', $partial, $file_name)) {
if($file_name[1] == $name) return file_get_contents($partial);
if($file_name[1] == $name) return ' '.file_get_contents($partial);
}
}
return 'Partial \''.$name.'\' not found';
Expand Down

0 comments on commit 53a2c31

Please sign in to comment.