summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorcl0ne <cl0ne@mithril.org.ua>2018-07-21 20:32:39 +0300
committerFrédéric Guillot <fred@miniflux.net>2018-07-25 15:07:34 -0700
commitc44880a5889ebaaec61001dddd6ba4e0b322d623 (patch)
tree7e01ff2be85536eafb87a683733f9ca7f71440f7 /app/Core
parent88228c3510a604b2f9682c06642987d1cd1dba11 (diff)
Exclude task links and user mentions from nesting
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Markdown.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php
index b8fe618f..ae6adb5e 100644
--- a/app/Core/Markdown.php
+++ b/app/Core/Markdown.php
@@ -145,4 +145,17 @@ class Markdown extends Parsedown
array('task_id' => $task_id)
);
}
+
+ /**
+ * Exclude from nesting task links and user mentions for links
+ *
+ * @param array $Excerpt
+ * @return array|null
+ */
+ protected function inlineLink($Excerpt)
+ {
+ $Inline = parent::inlineLink($Excerpt);
+ array_push($Inline['element']['nonNestables'], 'TaskLink', 'UserLink');
+ return $Inline;
+ }
}