aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/markdown/markdown.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/markdown/markdown.php')
-rw-r--r--plugins/markdown/markdown.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/markdown/markdown.php b/plugins/markdown/markdown.php
index 821bb125..08e64dae 100644
--- a/plugins/markdown/markdown.php
+++ b/plugins/markdown/markdown.php
@@ -28,6 +28,7 @@ function hook_markdown_render_linklist($data, $conf)
28 $value = stripNoMarkdownTag($value); 28 $value = stripNoMarkdownTag($value);
29 continue; 29 continue;
30 } 30 }
31 $value['description_src'] = $value['description'];
31 $value['description'] = process_markdown( 32 $value['description'] = process_markdown(
32 $value['description'], 33 $value['description'],
33 $conf->get('security.markdown_escape', true), 34 $conf->get('security.markdown_escape', true),
@@ -215,6 +216,15 @@ function reverse_text2clickable($description)
215 $descriptionLine 216 $descriptionLine
216 ); 217 );
217 218
219 // Make hashtag links markdown ready, otherwise the links will be ignored with escape set to true
220 if (!$codeBlockOn && !$codeLineOn) {
221 $descriptionLine = preg_replace(
222 '#<a href="([^ ]*)"'. $hashtagTitle .'>([^<]+)</a>#m',
223 '[$2]($1)',
224 $descriptionLine
225 );
226 }
227
218 $descriptionOut .= $descriptionLine; 228 $descriptionOut .= $descriptionLine;
219 if ($lineCount++ < count($descriptionLines) - 1) { 229 if ($lineCount++ < count($descriptionLines) - 1) {
220 $descriptionOut .= PHP_EOL; 230 $descriptionOut .= PHP_EOL;