diff options
author | Arthur <arthur@hoa.ro> | 2016-04-09 16:35:41 +0200 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-04-09 16:35:41 +0200 |
commit | 9486a2e92911c726673fe50674a0a408be3c774f (patch) | |
tree | 87aa5cd6b48732bd85509274cec18e6a4baff2d1 /plugins/markdown/markdown.php | |
parent | a1703c44c63852cf54d979a50921dc3a09508a82 (diff) | |
parent | 635d38c241665261fc32c0cfc0a59fffecb5d718 (diff) | |
download | Shaarli-9486a2e92911c726673fe50674a0a408be3c774f.tar.gz Shaarli-9486a2e92911c726673fe50674a0a408be3c774f.tar.zst Shaarli-9486a2e92911c726673fe50674a0a408be3c774f.zip |
Merge pull request #525 from ArthurHoaro/plugins/feeds-markdown2
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. |