Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Updated Zepto\FileLoader\MarkdownLoader to not return empty key-v…
Browse files Browse the repository at this point in the history
…alues in ``meta`` and updated template check in ``Zepto\Zepto``
  • Loading branch information
hassankhan committed Nov 11, 2013
1 parent 12c9535 commit 471a8a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library/Zepto/FileLoader/MarkdownLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private function parse_meta($file)
$meta[$field] = trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $match[1]));
}
else {
$meta[$field] = '';
unset($meta[$field]);
}
}

Expand Down
6 changes: 3 additions & 3 deletions library/Zepto/Zepto.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ protected function setup_router()
);

// Retrieve template name, if none given, use base template
$template_name = $content['meta']['template'] === ''
? 'base.twig'
: $content['meta']['template'];
$template_name = array_key_exists('template', $content['meta']) === true
? $content['meta']['template']
: 'base.twig';

// Merge Twig options and content into one array
$options = array_merge($twig_options, $content);
Expand Down

0 comments on commit 471a8a1

Please sign in to comment.