summaryrefslogtreecommitdiff
path: root/app/Core/Markdown.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
commiteeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch)
tree511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Core/Markdown.php
parent65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff)
Helpers refactoring
Diffstat (limited to 'app/Core/Markdown.php')
-rw-r--r--app/Core/Markdown.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php
index 3dd98617..fa4e8080 100644
--- a/app/Core/Markdown.php
+++ b/app/Core/Markdown.php
@@ -3,6 +3,7 @@
namespace Core;
use Parsedown;
+use Helper\Url;
/**
* Specific Markdown rules for Kanboard
@@ -15,8 +16,8 @@ class Markdown extends Parsedown
{
private $link;
private $helper;
-
- public function __construct($link, Helper $helper)
+
+ public function __construct($link, Url $helper)
{
$this->link = $link;
$this->helper = $helper;
@@ -29,9 +30,12 @@ class Markdown extends Parsedown
// Replace task #123 by a link to the task
if (! empty($this->link) && preg_match('!#(\d+)!i', $Excerpt['text'], $matches)) {
- $url = $this->helper->u($this->link['controller'],
- $this->link['action'],
- $this->link['params'] + array('task_id' => $matches[1]));
+ $url = $this->helper->href(
+ $this->link['controller'],
+ $this->link['action'],
+ $this->link['params'] + array('task_id' => $matches[1])
+ );
+
return array(
'extent' => strlen($matches[0]),
'element' => array(