Skip to content

Commit

Permalink
Trim leading slashes from assembled paths
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 14, 2023
1 parent 44e97cd commit 01cba90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DocumentationSearchIndex extends InMemoryPage
*/
public function __construct()
{
parent::__construct(DocumentationPage::sourceDirectory().'/search.json', [
parent::__construct(ltrim(DocumentationPage::sourceDirectory().'/search.json', '/'), [
'navigation' => ['hidden' => true],
]);
}
Expand All @@ -30,6 +30,6 @@ public function compile(): string

public function getOutputPath(): string
{
return DocumentationPage::outputDirectory().'/search.json';
return ltrim(DocumentationPage::outputDirectory().'/search.json', '/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public static function enabled(): bool

public static function routeKey(): string
{
return parent::outputDirectory().'/search';
return ltrim(parent::outputDirectory().'/search');
}
}

0 comments on commit 01cba90

Please sign in to comment.