diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-03-12 18:39:57 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-03-26 17:13:58 +0100 |
commit | 635d38c241665261fc32c0cfc0a59fffecb5d718 (patch) | |
tree | a5a426225b071bfd529a1a5be149eb629c832758 /plugins/markdown/markdown.php | |
parent | 5f143b72eaafeda533fcb997ecca73d38258546e (diff) | |
download | Shaarli-635d38c241665261fc32c0cfc0a59fffecb5d718.tar.gz Shaarli-635d38c241665261fc32c0cfc0a59fffecb5d718.tar.zst Shaarli-635d38c241665261fc32c0cfc0a59fffecb5d718.zip |
Process feeds content with Markdown
Diffstat (limited to 'plugins/markdown/markdown.php')
-rw-r--r-- | plugins/markdown/markdown.php | 19 |
1 files changed, 19 insertions, 0 deletions
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 | |||
@@ -34,6 +34,25 @@ function hook_markdown_render_linklist($data) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Parse feed linklist descriptions. | ||
38 | * | ||
39 | * @param array $data linklist data. | ||
40 | * | ||
41 | * @return mixed linklist data parsed in markdown (and converted to HTML). | ||
42 | */ | ||
43 | function hook_markdown_render_feed($data) | ||
44 | { | ||
45 | foreach ($data['links'] as &$value) { | ||
46 | if (!empty($value['tags']) && noMarkdownTag($value['tags'])) { | ||
47 | continue; | ||
48 | } | ||
49 | $value['description'] = process_markdown($value['description']); | ||
50 | } | ||
51 | |||
52 | return $data; | ||
53 | } | ||
54 | |||
55 | /** | ||
37 | * Parse daily descriptions. | 56 | * Parse daily descriptions. |
38 | * | 57 | * |
39 | * @param array $data daily data. | 58 | * @param array $data daily data. |