raster pushed a commit to branch master.

http://git.enlightenment.org/website/www.git/commit/?id=40528678db704e0ecdd53b4e84c1f969dcc007e1

commit 40528678db704e0ecdd53b4e84c1f969dcc007e1
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Jun 16 14:53:50 2015 +0900

    WIKI CUSTOM - codelink plugin - fix links to not have braces
    
    this should fix the custom codelink plugin to not include () from
    functions turned into links inside the link
---
 public_html/lib/plugins/codelink/syntax.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/public_html/lib/plugins/codelink/syntax.php 
b/public_html/lib/plugins/codelink/syntax.php
index fbffdec..8505b0f 100644
--- a/public_html/lib/plugins/codelink/syntax.php
+++ b/public_html/lib/plugins/codelink/syntax.php
@@ -95,6 +95,7 @@ class syntax_plugin_codelink extends DokuWiki_Syntax_Plugin {
             $language = str_replace('~~', '', $language);
             $this->keylanguage = $language;
         } else {
+            $symbol = str_replace("()", "", $match);
             $data[0] = '<code class="code"><a href=' .
               str_replace
               (
@@ -103,9 +104,9 @@ class syntax_plugin_codelink extends DokuWiki_Syntax_Plugin 
{
                      '{FNAMEL}',
                      '{FNAMEU}'),
                array(
-                     str_replace('+', '%20', urlencode($match)),
-                     str_replace('+', '%20', urlencode(strtolower($match))),
-                     str_replace('+', '%20', urlencode(strtoupper($match))),
+                     str_replace('+', '%20', urlencode($symbol)),
+                     str_replace('+', '%20', urlencode(strtolower($symbol))),
+                     str_replace('+', '%20', urlencode(strtoupper($symbol))),
                      ),
                $this->keydata[$this->keylanguage]['link']) .
               '><span class="kw5">' . $match . '</span></a></code>';

-- 


Reply via email to