diff --git a/README.md b/README.md index cbcbf35..add5024 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Here you can see an example of just how simple this package is to use. ```php use GrahamCampbell\Markdown\Facades\Markdown; -Markdown::convertToHtml('foo'); //
foo
+Markdown::convert('foo')->getContent(); //foo
``` If you prefer to use dependency injection over facades like me, then you can easily inject the class like so: diff --git a/tests/Facades/MarkdownTest.php b/tests/Facades/MarkdownTest.php index 4f342c8..6565391 100644 --- a/tests/Facades/MarkdownTest.php +++ b/tests/Facades/MarkdownTest.php @@ -60,7 +60,7 @@ protected function getFacadeRoot() public function testConvertToHtml() { - $result = Markdown::convertToHtml('foo'); + $result = Markdown::convert('foo'); $this->assertSame("foo
\n", $result->getContent()); } @@ -69,7 +69,7 @@ public function testDisallowingUnsafeLinks() { $this->app->config->set('markdown.allow_unsafe_links', false); - $result = Markdown::convertToHtml("[Click me](javascript:alert('XSS'))"); + $result = Markdown::convert("[Click me](javascript:alert('XSS'))"); $this->assertSame("\n", $result->getContent()); } @@ -82,7 +82,7 @@ public function testSmartPuncConversion() SmartPunctExtension::class, ]); - $result = Markdown::convertToHtml("'A', 'B', and 'C' are letters."); + $result = Markdown::convert("'A', 'B', and 'C' are letters."); $this->assertSame("‘A’, ‘B’, and ‘C’ are letters.
\n", $result->getContent()); }