mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02: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
|
||||
while(strpos($relativeUrl, '..') !== FALSE) {
|
||||
$relativeUrl = preg_replace('/\w+\/\.\.\//', '', $relativeUrl);
|
||||
$relativeUrl = preg_replace('/[-\w]+\/\.\.\//', '', $relativeUrl);
|
||||
}
|
||||
|
||||
// Replace any double slashes (apart from protocol)
|
||||
@ -428,4 +428,4 @@ class DocumentationParser {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user