aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/formatter/BookmarkMarkdownFormatter.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-05-12 12:44:48 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commit03340c18ead651ef9e11f883745695f2edafbae3 (patch)
tree619822bfb909f68f78f4a266a89e7249644b9d4c /application/formatter/BookmarkMarkdownFormatter.php
parent8e47af2b3620c920116ec056173277c039163ec1 (diff)
downloadShaarli-03340c18ead651ef9e11f883745695f2edafbae3.tar.gz
Shaarli-03340c18ead651ef9e11f883745695f2edafbae3.tar.zst
Shaarli-03340c18ead651ef9e11f883745695f2edafbae3.zip
Slim router: handle add tag route
Diffstat (limited to 'application/formatter/BookmarkMarkdownFormatter.php')
-rw-r--r--application/formatter/BookmarkMarkdownFormatter.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/formatter/BookmarkMarkdownFormatter.php b/application/formatter/BookmarkMarkdownFormatter.php
index 077e5312..5d244d4c 100644
--- a/application/formatter/BookmarkMarkdownFormatter.php
+++ b/application/formatter/BookmarkMarkdownFormatter.php
@@ -114,7 +114,7 @@ class BookmarkMarkdownFormatter extends BookmarkDefaultFormatter
114 114
115 /** 115 /**
116 * Replace hashtag in Markdown links format 116 * Replace hashtag in Markdown links format
117 * E.g. `#hashtag` becomes `[#hashtag](?addtag=hashtag)` 117 * E.g. `#hashtag` becomes `[#hashtag](./add-tag/hashtag)`
118 * It includes the index URL if specified. 118 * It includes the index URL if specified.
119 * 119 *
120 * @param string $description 120 * @param string $description
@@ -133,7 +133,7 @@ class BookmarkMarkdownFormatter extends BookmarkDefaultFormatter
133 * \p{Mn} - any non marking space (accents, umlauts, etc) 133 * \p{Mn} - any non marking space (accents, umlauts, etc)
134 */ 134 */
135 $regex = '/(^|\s)#([\p{Pc}\p{N}\p{L}\p{Mn}]+)/mui'; 135 $regex = '/(^|\s)#([\p{Pc}\p{N}\p{L}\p{Mn}]+)/mui';
136 $replacement = '$1[#$2]('. $indexUrl .'?addtag=$2)'; 136 $replacement = '$1[#$2]('. $indexUrl .'./add-tag/$2)';
137 137
138 $descriptionLines = explode(PHP_EOL, $description); 138 $descriptionLines = explode(PHP_EOL, $description);
139 $descriptionOut = ''; 139 $descriptionOut = '';