mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
added fix for file-based paths including .md filenames
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user