From: Michael Wallner Date: Wed, 20 Aug 2014 13:45:11 +0000 (+0200) Subject: prepare for general docs prepended by ": " X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=bcc37329aa8f481aeb837ddad69b13ec2dee2d8c;p=mdref%2Fmdref prepare for general docs prepended by ": " --- diff --git a/mdref/RefEntry.php b/mdref/RefEntry.php index 9db99f7..2ad3d27 100644 --- a/mdref/RefEntry.php +++ b/mdref/RefEntry.php @@ -56,13 +56,15 @@ class RefEntry continue; } if (strlen($link)) { - if ($upper && !ctype_upper($parts[$i][0])) { + if ($parts[$i][0] === ":") { + $link = ""; + } elseif ($upper && !ctype_upper($parts[$i][0])) { $link .= "::"; } else { $link .= "\\"; } } - $link .= $parts[$i]; + $link .= trim($parts[$i], ": "); $upper = ctype_upper($parts[$i][0]); } return $link;