mirror of
https://github.com/getgrav/grav.git
synced 2026-02-22 06:28:03 +01:00
Part 2 of greedy fix
This commit is contained in:
@@ -220,7 +220,7 @@ trait ParsedownGravTrait
|
||||
// If this is a 'real' filepath clean it up
|
||||
if (file_exists($this->page->path() . '/' . parse_url($markdown_url, PHP_URL_PATH))) {
|
||||
$relative_path = $this->base_url . preg_replace('/\/([\d]+\.)/', '/', str_replace($this->pages_dir, '', $this->page->path()));
|
||||
$markdown_url = preg_replace('/^([\d]+.)/', '', preg_replace('/\/([\d]+.)/', '/', trim(preg_replace('/[^\/]+(\.md$)/', '', $markdown_url), '/')));
|
||||
$markdown_url = preg_replace('/^([\d]+\.)/', '', preg_replace('/\/([\d]+\.)/', '/', trim(preg_replace('/[^\/]+(\.md$)/', '', $markdown_url), '/')));
|
||||
}
|
||||
|
||||
// else its a relative path already
|
||||
|
||||
Reference in New Issue
Block a user