Skip to content

Commit

Permalink
Merge pull request #2 from HyuchiaDiego/spaces
Browse files Browse the repository at this point in the history
Fixed file spaces
  • Loading branch information
Hyuchia committed Jul 22, 2015
2 parents f639d16 + 7ae9776 commit 076cb85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Draft.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ function build($directory){
$menu = "";
$pages = "";
foreach (glob("$directory/*", GLOB_MARK) as $f) {
$find = array(".html", ".md",".php");
$replace = array("","","");
$find = array(".html", ".md",".php"," ");
$replace = array("","","","-");
$spaces = array("_","-");
$nice_name = str_replace($find, $replace, basename($f));
$cap_name = ucwords(strtolower((str_replace("_"," ", $nice_name))));
$cap_name = ucwords(strtolower((str_replace($spaces," ", $nice_name))));
if (substr($f, -1) === '/') {
$content = build($f);
$pages.= $content[1];
Expand Down
File renamed without changes.

0 comments on commit 076cb85

Please sign in to comment.