diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-05-12 12:44:48 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 03340c18ead651ef9e11f883745695f2edafbae3 (patch) | |
tree | 619822bfb909f68f78f4a266a89e7249644b9d4c /application/formatter | |
parent | 8e47af2b3620c920116ec056173277c039163ec1 (diff) | |
download | Shaarli-03340c18ead651ef9e11f883745695f2edafbae3.tar.gz Shaarli-03340c18ead651ef9e11f883745695f2edafbae3.tar.zst Shaarli-03340c18ead651ef9e11f883745695f2edafbae3.zip |
Slim router: handle add tag route
Diffstat (limited to 'application/formatter')
-rw-r--r-- | application/formatter/BookmarkMarkdownFormatter.php | 4 |
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 = ''; |