From 4c10cb5c98198eb29a982ee8953763ae4cc665f2 Mon Sep 17 00:00:00 2001 From: Olivier Maridat Date: Fri, 16 May 2014 09:02:14 +0200 Subject: Add a specific Kanboard description parser This parser still calls the markdown parser, but also replace # to a link to the given task. --- core/helper.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/helper.php') diff --git a/core/helper.php b/core/helper.php index f3c3c3b8..7e65543a 100644 --- a/core/helper.php +++ b/core/helper.php @@ -23,6 +23,13 @@ function get_username() return $_SESSION['user']['username']; } +function parse($text) +{ + $text = markdown($text); + $text = preg_replace('!#(\d+)!i', '$0', $text); + return $text; +} + function markdown($text) { require_once __DIR__.'/../vendor/Michelf/MarkdownExtra.inc.php'; -- cgit v1.2.3