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

Commit

Permalink
Merge branch 'develop' into feature/big-ass-nav-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Jan 13, 2014
2 parents afbf64a + 3695ddf commit 24fed15
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 35 deletions.
32 changes: 8 additions & 24 deletions library/Zepto/FileLoader/MarkdownLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,17 @@ private function post_process()
*/
private function parse_meta($file)
{
// Define metadata
$meta = array(
'title' => 'Title',
'description' => 'Description',
'author' => 'Author',
'date' => 'Date',
'robots' => 'Robots',
'template' => 'Template'
);
// Grab meta section between '/* ... */' in the content file
preg_match_all('#/\*(.*?)\*/#s', $file, $meta);

// Grab meta fields between '/* ... */' in the content file
foreach ($meta as $field => $regex) {
if (
preg_match(
'/^[ \t\/*#@]*' . preg_quote($regex, '/') . ':(.*)$/mi',
$file,
$match
) && $match[1]
) {
$meta[$field] = trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $match[1]));
}
else {
unset($meta[$field]);
}
// Retrieve individual meta fields
preg_match_all('/^[\t\/*#@]*(.*):(.*)$/mi', $meta[1][0], $match);

for ($i=0; $i < count($match[1]); $i++) {
$result[strtolower($match[1][$i])] = trim(htmlentities($match[2][$i]));
}

return $meta;
return $result;
}

/**
Expand Down
6 changes: 0 additions & 6 deletions library/Zepto/FileLoader/PluginLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@

class PluginLoader extends \Zepto\FileLoader {

// public function __construct($plugin_dir)
// {
// parent::__construct();
// $this->plugin_dir = $plugin_dir;
// }

/**
* Loads in a single file or all files in a directory if $file_path is a folder
*
Expand Down
5 changes: 0 additions & 5 deletions library/Zepto/FileWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@

class FileWriter {

public function __construct()
{

}

// Seems to work, meh
public function write($file_path, $file_data)
{
Expand Down

0 comments on commit 24fed15

Please sign in to comment.