mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
Merge pull request #34 from trev/patch-1
Fix/support dash in relative links
This commit is contained in:
commit
d3b748cd29
@ -388,7 +388,7 @@ class DocumentationParser {
|
|||||||
|
|
||||||
// Resolve relative paths
|
// Resolve relative paths
|
||||||
while(strpos($relativeUrl, '..') !== FALSE) {
|
while(strpos($relativeUrl, '..') !== FALSE) {
|
||||||
$relativeUrl = preg_replace('/\w+\/\.\.\//', '', $relativeUrl);
|
$relativeUrl = preg_replace('/[-\w]+\/\.\.\//', '', $relativeUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace any double slashes (apart from protocol)
|
// Replace any double slashes (apart from protocol)
|
||||||
@ -428,4 +428,4 @@ class DocumentationParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user