Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #35 from 8fold/working
Browse files Browse the repository at this point in the history
ESMarkdown::body
  • Loading branch information
joshbruce committed Jul 12, 2020
2 parents 7e6573d + 9e6f4b9 commit f92fbb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/ESMarkdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ private function parsed()
return YamlFrontMatter::parse($this->value());
}

public function body()
{
$body = $this->parsed()->body();
return Shoop::string($body);
}

public function meta()
{
$matter = $this->parsed()->matter();
Expand Down
4 changes: 2 additions & 2 deletions tests/StoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ public function testCanUnfold()

public function testParent()
{
$expected = Shoop::string(__DIR__)->divide("/")->dropLast();
$expected = Shoop::string(__DIR__)->divide("/")->dropLast()->join("/");
$actual = Shoop::store(__DIR__)->dropLast();
$this->assertTrue(is_a($actual, ESStore::class));

$actual = $actual->plus("src", "Routes", "any.php");
$this->assertTrue(is_a($actual, ESStore::class));

$actual = $actual->dropLast(3);
$this->assertSame($expected, $actual->unfold());
$this->assertSame($expected->unfold(), $actual->unfold());
}

public function testCanCheckEndsWith()
Expand Down

0 comments on commit f92fbb6

Please sign in to comment.