Skip to content

Commit

Permalink
Merge pull request #10 from DavidBadura/fix-bc-break
Browse files Browse the repository at this point in the history
fix blockquote bc break
  • Loading branch information
DavidBadura committed Oct 23, 2021
2 parents d3c9ed6 + 517485e commit cdc1a29
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/MarkdownBuilder.php
Expand Up @@ -98,6 +98,16 @@ public function blockquote(string $text): self
return $this->p($content);
}

/**
* @deprecated use blockquote()
*
* @return $this
*/
public function blockqoute(string $text): self
{
return $this->blockquote($text);
}

/**
* @param array<string> $list
*
Expand Down
15 changes: 15 additions & 0 deletions tests/MarkdownBuilderTest.php
Expand Up @@ -101,6 +101,21 @@ public function testBlockquote(): void
self::assertEquals($markdown, $builder->getMarkdown());
}

/**
* @deprecated
*/
public function testBlockquoteTypo(): void
{
$markdown = <<<MARKDOWN
> foo bar
> hey ho
MARKDOWN;

$builder = new MarkdownBuilder();
$builder->blockqoute("foo bar\n hey ho");
self::assertEquals($markdown, $builder->getMarkdown());
}

public function testBlockquoteComplex(): void
{
$markdown = <<<MARKDOWN
Expand Down

0 comments on commit cdc1a29

Please sign in to comment.