Skip to content

Commit

Permalink
Remove the MarkdownService::withPermalinks method
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 1, 2024
1 parent 22a7745 commit 1100719
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ This serves two purposes:
- This also removes the `<x-hyde::docs.search-input />` and `<x-hyde::docs.search-scripts />` Blade components, replaced by the new `<x-hyde::docs.hyde-search />` component.
- Removed the `.torchlight-enabled` CSS class in https://github.com/hydephp/develop/pull/2036.
- Removed The `hyde.css` file from HydeFront in https://github.com/hydephp/develop/pull/2037 as all styles were refactored to Tailwind in https://github.com/hydephp/develop/pull/2024.
- Removed the `MarkdownService::withPermalinks` method in https://github.com/hydephp/develop/pull/2047

### Fixed

Expand Down
7 changes: 0 additions & 7 deletions packages/framework/src/Framework/Services/MarkdownService.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ public function addFeature(string $feature): static
return $this;
}

public function withPermalinks(): static
{
$this->addFeature('permalinks');

return $this;
}

public function isDocumentationPage(): bool
{
return isset($this->pageClass) && $this->pageClass === DocumentationPage::class;
Expand Down
16 changes: 0 additions & 16 deletions packages/framework/tests/Feature/MarkdownServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ public function testMethodWithTableOfContentsMethodChainAddsTheTableOfContentsFe
$this->assertContains('table-of-contents', $service->features);
}

public function testMethodWithPermalinksMethodChainAddsThePermalinksFeature()
{
$service = $this->makeService();

$service->withPermalinks();
$this->assertContains('permalinks', $service->features);
}

public function testHasFeatureReturnsTrueIfTheFeatureIsInTheArray()
{
$service = $this->makeService();
Expand All @@ -180,14 +172,6 @@ public function testHasFeatureReturnsFalseIfTheFeatureIsNotInTheArray()
$this->assertFalse($service->hasFeature('test'));
}

public function testMethodCanEnablePermalinksReturnsTrueIfThePermalinksFeatureIsInTheArray()
{
$service = $this->makeService();

$service->addFeature('permalinks');
$this->assertTrue($service->canEnablePermalinks());
}

public function testMethodCanEnablePermalinksIsAutomaticallyForDocumentationPages()
{
$service = new MarkdownServiceTestClass(pageClass: DocumentationPage::class);
Expand Down

0 comments on commit 1100719

Please sign in to comment.