mirror of
https://github.com/getgrav/grav.git
synced 2026-09-11 00:18:21 +02:00
added check to see if on same page
This commit is contained in:
@@ -236,6 +236,12 @@ trait ParsedownGravTrait
|
||||
$normalized_path = Utils::normalizePath($this->page->path() . '/' . $markdown_url);
|
||||
}
|
||||
|
||||
// special check to see if path checking is required.
|
||||
$just_path = str_replace($normalized_url, '', $normalized_path);
|
||||
if ($just_path == $this->page->path()) {
|
||||
return $normalized_url;
|
||||
}
|
||||
|
||||
// if this file exits, get the page and work with that
|
||||
if ($normalized_path) {
|
||||
$url_bits = parse_url($normalized_path);
|
||||
|
||||
Reference in New Issue
Block a user