]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Process feeds content with Markdown 525/head
authorArthurHoaro <arthur@hoa.ro>
Sat, 12 Mar 2016 17:39:57 +0000 (18:39 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sat, 26 Mar 2016 16:13:58 +0000 (17:13 +0100)
plugins/markdown/markdown.php

index 544ed22ecb6c71f0b8b769df580b661d5e3aa5be..57fcce3268a6aa5c0454e97cab9a395959635e46 100644 (file)
@@ -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.
  *