Use commonmark’s built in autolink extension

This commit is contained in:
Jonny Barnes 2020-06-19 21:39:02 +01:00
parent 48c2482ee9
commit 0a4b803209
2 changed files with 13 additions and 1 deletions

View file

@ -284,4 +284,16 @@ JSON;
$this->assertNull($note->twitter);
}
public function test_markdown_gets_converted()
{
$note = Note::create([
'note' => 'The best search engine? https://duckduckgo.com',
]);
$this->assertSame(
'<p>The best search engine? <a href="https://duckduckgo.com">https://duckduckgo.com</a></p>' . PHP_EOL,
$note->note
);
}
}