added fix for file-based paths including .md filenames

This commit is contained in:
Andy Miller
2014-08-31 14:34:32 -06:00
parent a8c5d70967
commit 8cbe0ec591

View File

@@ -121,7 +121,8 @@ trait MarkdownGravLinkTrait
preg_replace('/\/([\d]+.)/', '/',
str_replace(PAGES_DIR, '/', $this->page->path()));
$markdown_url = preg_replace('/^([\d]+.)/', '',
preg_replace('/\/([\d]+.)/', '/', $markdown_url));
preg_replace('/\/([\d]+.)/', '/',
trim(preg_replace('/[^\/]+(\.md$)/', '', $markdown_url), '/')));
}
// else its a relative path already