From c5941f316a49c94eff354b63e75b3add98ac4aea Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 21 Oct 2016 12:38:38 +0200 Subject: Fix an issue with links not being reversed in code blocks Fixes #672 + Markdown to HTML unit test --- tests/plugins/PluginMarkdownTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/plugins/PluginMarkdownTest.php') diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index 3593a556..12bdda24 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php @@ -151,4 +151,17 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase $data = hook_markdown_render_daily($data); $this->assertEquals($str, $data['cols'][0][0]['formatedDescription']); } + + /** + * Test hashtag links processed with markdown. + */ + function testMarkdownHashtagLinks() + { + $md = file_get_contents('tests/plugins/resources/markdown.md'); + $md = format_description($md); + $html = file_get_contents('tests/plugins/resources/markdown.html'); + + $data = process_markdown($md); + $this->assertEquals($html, $data); + } } -- cgit v1.2.3