aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-08-08 18:29:26 +0200
committerMax Kostikov <max@kostikov.co>2019-08-08 18:29:26 +0200
commit33e258291870fcfe22ea8522c5e97d3bdeb84437 (patch)
tree5df7e7c0520a9b40dc0e9aa66c0297dbb0b4bd75 /include
parent1c2f4132113a38948468fa992b738cb864e67774 (diff)
downloadvolse-hubzilla-33e258291870fcfe22ea8522c5e97d3bdeb84437.tar.gz
volse-hubzilla-33e258291870fcfe22ea8522c5e97d3bdeb84437.tar.bz2
volse-hubzilla-33e258291870fcfe22ea8522c5e97d3bdeb84437.zip
Update zid.php
Diffstat (limited to 'include')
-rw-r--r--include/zid.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/zid.php b/include/zid.php
index 05161d5c2..4b17e1cd2 100644
--- a/include/zid.php
+++ b/include/zid.php
@@ -208,20 +208,20 @@ function red_zrl_callback($matches) {
// Catch and exclude trailing punctuation
if (preg_match("/[.,;:!?)]*$/i", $matches[2], $pts))
$matches[2] = substr($matches[2], 0, strlen($matches[2])-strlen($pts[0]));
-
- $zrl = is_matrix_url($matches[2]);
-
- $t = strip_zids($matches[2]);
- if($t !== $matches[2]) {
- $zrl = true;
- $matches[2] = $t;
- }
-
- if($matches[1] === '#^')
- $matches[1] = '';
-
+
+ $zrl = is_matrix_url($matches[2]);
+
+ $t = strip_zids($matches[2]);
+ if($t !== $matches[2]) {
+ $zrl = true;
+ $matches[2] = $t;
+ }
+
+ if($matches[1] === '#^')
+ $matches[1] = '';
+
if($zrl)
- return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]' . $pts[0];
+ return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]' . $pts[0];
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]' . $pts[0];
}