From 635d38c241665261fc32c0cfc0a59fffecb5d718 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 12 Mar 2016 18:39:57 +0100 Subject: [PATCH] Process feeds content with Markdown --- plugins/markdown/markdown.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/plugins/markdown/markdown.php b/plugins/markdown/markdown.php index 544ed22e..57fcce32 100644 --- a/plugins/markdown/markdown.php +++ b/plugins/markdown/markdown.php @@ -33,6 +33,25 @@ function hook_markdown_render_linklist($data) return $data; } +/** + * Parse feed linklist descriptions. + * + * @param array $data linklist data. + * + * @return mixed linklist data parsed in markdown (and converted to HTML). + */ +function hook_markdown_render_feed($data) +{ + foreach ($data['links'] as &$value) { + if (!empty($value['tags']) && noMarkdownTag($value['tags'])) { + continue; + } + $value['description'] = process_markdown($value['description']); + } + + return $data; +} + /** * Parse daily descriptions. * -- 2.41.0