浏览代码

Merge pull request #5 from ssahara/patch

read title correctly even if no flags given (thanks @ssahara)
Giuseppe Di Terlizzi 10 年之前
父节点
当前提交
ff9ea7d0ae
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      syntax/icon.php

+ 2 - 2
syntax/icon.php

@@ -52,9 +52,9 @@ class syntax_plugin_icons_icon extends DokuWiki_Syntax_Plugin {
     public function handle($match, $state, $pos, Doku_Handler $handler) {
 
         $match                = substr($match, 2, -2); // strip markup
+        list($match, $title, $url) = explode('|', $match);
         list($match, $flags)  = explode('?', $match, 2);
-        list($pack, $icon)    = preg_split('/>/u', $match, 2);
-        list($flags, $title, $url)  = explode('|', $flags);
+        list($pack, $icon)    = explode('>', $match, 2);
 
         return array($pack, $icon, explode('&', $flags), $title, $url, $align, $match, $state, $pos);