diff options
Diffstat (limited to 'core/helper.php')
-rw-r--r-- | core/helper.php | 7 |
1 files changed, 7 insertions, 0 deletions
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', '<a href="?controller=task&action=show&task_id=$1">$0</a>', $text); + return $text; +} + function markdown($text) { require_once __DIR__.'/../vendor/Michelf/MarkdownExtra.inc.php'; |