cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Url.php /Text_Wiki/Text/Wiki/Render/Cowiki Url.php /Text_Wiki/Text/Wiki/Render/Creole Url.php
/Text_Wiki/Text/Wiki/Render/Docbook Url.php /Text_Wiki/Text/Wiki/Render/Doku Url.php /Text_Wiki/Text/Wiki/Render/Latex Url.php
/Text_Wiki/Text/Wiki/Render/Plain Url.php /Text_Wiki/Text/Wiki/Render/Tiki Url.php /Text_Wiki/Text/Wiki/Render/Xhtml Url.php /Text_Wiki/tests
Cowiki_Render_Url.phpt Creole_Parse_Url.phpt Creole_Render_Url.phpt Docbook_Render_Url.phpt Doku_Render_Url.phpt Latex_Render_Url.phpt
Plain_Render_Url.phpt Tiki_Render_Url.phpt Xhtml_Render_Url.phpt

From: Date: Tue, 24 Oct 2006 14:53:32 +0000
Subject: cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Url.php /Text_Wiki/Text/Wiki/Render/Cowiki Url.php /Text_Wiki/Text/Wiki/Render/Creole Url.php
/Text_Wiki/Text/Wiki/Render/Docbook Url.php /Text_Wiki/Text/Wiki/Render/Doku Url.php /Text_Wiki/Text/Wiki/Render/Latex Url.php
/Text_Wiki/Text/Wiki/Render/Plain Url.php /Text_Wiki/Text/Wiki/Render/Tiki Url.php /Text_Wiki/Text/Wiki/Render/Xhtml Url.php /Text_Wiki/tests
Cowiki_Render_Url.phpt Creole_Parse_Url.phpt Creole_Render_Url.phpt Docbook_Render_Url.phpt Doku_Render_Url.phpt Latex_Render_Url.phpt
Plain_Render_Url.phpt Tiki_Render_Url.phpt Xhtml_Render_Url.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42786@lists.php.net to get a copy of this message
mic Tue Oct 24 14:53:32 2006 UTC Added files: /pear/Text_Wiki/tests Cowiki_Render_Url.phpt Creole_Parse_Url.phpt Creole_Render_Url.phpt Docbook_Render_Url.phpt Doku_Render_Url.phpt Latex_Render_Url.phpt Plain_Render_Url.phpt Tiki_Render_Url.phpt Xhtml_Render_Url.phpt Modified files: /pear/Text_Wiki/Text/Wiki/Parse/Creole Url.php /pear/Text_Wiki/Text/Wiki/Render/Cowiki Url.php /pear/Text_Wiki/Text/Wiki/Render/Creole Url.php /pear/Text_Wiki/Text/Wiki/Render/Docbook Url.php /pear/Text_Wiki/Text/Wiki/Render/Doku Url.php /pear/Text_Wiki/Text/Wiki/Render/Latex Url.php /pear/Text_Wiki/Text/Wiki/Render/Plain Url.php /pear/Text_Wiki/Text/Wiki/Render/Tiki Url.php /pear/Text_Wiki/Text/Wiki/Render/Xhtml Url.php Log:

http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Parse/Creole/Url.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Parse/Creole/Url.php diff -u pear/Text_Wiki/Text/Wiki/Parse/Creole/Url.php:1.1 pear/Text_Wiki/Text/Wiki/Parse/Creole/Url.php:1.2 --- pear/Text_Wiki/Text/Wiki/Parse/Creole/Url.php:1.1 Mon Oct 23 13:11:27 2006 +++ pear/Text_Wiki/Text/Wiki/Parse/Creole/Url.php Tue Oct 24 14:53:31 2006 @@ -20,7 +20,7 @@ * * @license LGPL * - * @version $Id: Url.php,v 1.1 2006/10/23 13:11:27 mic Exp $ + * @version $Id: Url.php,v 1.2 2006/10/24 14:53:31 mic Exp $ * */ @@ -72,30 +72,31 @@ if (! $href) $href = $rawurl; if (! $text) $text = $href; - return $this->wiki->addToken( - $this->rule, - array( - 'href' => $href, - 'text' => $text - ) - ); - - /*return $this->wiki->addToken( - $this->rule, - array( - 'type' => 'start', - 'href' => $href, - 'text' => $text - ) - ) . $text . - $this->wiki->addToken( - $this->rule, - array( - 'type' => 'end', - 'href' => $href, - 'text' => $text - ) - );*/ + if (! strlen($text) || $text == $href) { + return $this->wiki->addToken( + $this->rule, + array( + 'href' => $href + ) + ); + } else { + return $this->wiki->addToken( + $this->rule, + array( + 'type' => 'start', + 'href' => $href, + 'text' => $text + ) + ) . $text . + $this->wiki->addToken( + $this->rule, + array( + 'type' => 'end', + 'href' => $href, + 'text' => $text + ) + ); + } } } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Cowiki/Url.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Cowiki/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Cowiki/Url.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Cowiki/Url.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Cowiki/Url.php:1.1 Thu Jul 21 20:56:14 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Cowiki/Url.php Tue Oct 24 14:53:31 2006 @@ -2,26 +2,43 @@ class Text_Wiki_Render_CoWiki_Url extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { - if (!strlen($options['text']) || $options['page'] == $options['text']) { - return $options['href']; - } else { - return '(('.$options['href'].')('.$options['text'].'))'; + extract($options); + if ($type == 'start') { + if (! strlen($text) || $href == $text) { + return $href; + } else { + return '(('.$href.')('; + } + } + else if ($type == 'end') { + if (! strlen($text) || $href == $text) { + return ''; + } else { + return '))'; + } + } + else { + if (! strlen($text) || $href == $text) { + return $href; + } else { + return '(('.$href.')('.$text.'))'; + } } } } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Creole/Url.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Creole/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Creole/Url.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Creole/Url.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Creole/Url.php:1.1 Mon Oct 23 13:11:27 2006 +++ pear/Text_Wiki/Text/Wiki/Render/Creole/Url.php Tue Oct 24 14:53:31 2006 @@ -17,21 +17,22 @@ function token($options) { - if ($options['type'] == 'start') { - if (! strlen($options['text']) || $options['page'] == $options['text']) { - return '[['.$options['href']; + extract($options); + if ($type == 'start') { + if (! strlen($text) || $href == $text) { + return '[['.$href; } else { - return '[['.$options['href'].'|'; + return '[['.$href.'|'; } } - else if ($options['type'] == 'end') { + else if ($type == 'end') { return ']]'; } else { - if (! strlen($options['text']) || $options['page'] == $options['text']) { - return '[['.$options['href'].']]'; + if (! strlen($text) || $href == $text) { + return '[['.$href.']]'; } else { - return '[['.$options['href'].'|'.$options['text'].']]'; + return '[['.$href.'|'.$text.']]'; } } } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Docbook/Url.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Docbook/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Docbook/Url.php:1.3 pear/Text_Wiki/Text/Wiki/Render/Docbook/Url.php:1.4 --- pear/Text_Wiki/Text/Wiki/Render/Docbook/Url.php:1.3 Sat Feb 11 07:16:37 2006 +++ pear/Text_Wiki/Text/Wiki/Render/Docbook/Url.php Tue Oct 24 14:53:31 2006 @@ -9,7 +9,7 @@ * @package Text_Wiki_Docbook * @author bertrand Gugger <bertrand@toggg.com> * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Url.php,v 1.3 2006/02/11 07:16:37 toggg Exp $ + * @version CVS: $Id: Url.php,v 1.4 2006/10/24 14:53:31 mic Exp $ * @link http://pear.php.net/package/Text_Wiki_Docbook */ @@ -71,44 +71,54 @@ // generate an image tag $css = $this->formatConf(' class="%s"', 'css_img'); - $output = "<img$css src=\"$href\" alt=\"$text\" />"; + $start = "<img$css src=\"$href\" alt=\"$text\" /><!-- "; + $end = " -->"; } else { // should we build a target clause? if ($href{0} == '#' || - strtolower(substr($href, 0, 7)) == 'mailto:') { - // targets not allowed for on-page anchors - // and mailto: links. + strtolower(substr($href, 0, 7)) == 'mailto:') { + // targets not allowed for on-page anchors + // and mailto: links. $target = ''; } else { - // allow targets on non-anchor non-mailto links + // allow targets on non-anchor non-mailto links $target = $this->getConf('target'); } // generate a regular link (not an image) $text = $this->textEncode($text); $css = $this->formatConf(' class="%s"', "css_$type"); - $output = "<a$css href=\"$href\""; + $start = "<a$css href=\"$href\""; if ($target) { // use a "popup" window. this is DocBook compliant, suggested by // Aaron Kalin. uses the $target as the new window name. $target = $this->textEncode($target); - $output .= " onclick=\"window.open(this.href, '$target');"; - $output .= " return false;\""; + $start .= " onclick=\"window.open(this.href, '$target');"; + $start .= " return false;\""; } // finish up output - $output .= ">$text</a>"; + $start .= ">"; + $end = "</a>"; // make numbered references look like footnotes when no // CSS class specified, make them superscript by default if ($type == 'footnote' && ! $css) { - $output = '<sup>' . $output . '</sup>'; + $start = '<sup>' . $start; + $end = $end . '</sup>'; } } + if ($options['type'] == 'start') { + $output = $start; + } else if ($options['type'] == 'end') { + $output = $end; + } else { + $output = $start . $text . $end; + } return $output; } } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Doku/Url.php?r1=1.2&r2=1.3&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Doku/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Doku/Url.php:1.2 pear/Text_Wiki/Text/Wiki/Render/Doku/Url.php:1.3 --- pear/Text_Wiki/Text/Wiki/Render/Doku/Url.php:1.2 Tue Mar 14 02:20:05 2006 +++ pear/Text_Wiki/Text/Wiki/Render/Doku/Url.php Tue Oct 24 14:53:32 2006 @@ -2,27 +2,42 @@ class Text_Wiki_Render_Doku_Url extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { - if (!strlen($options['text']) - || (isset($options['page']) && $options['page'] == $options['text'])) { - return $options['href']; - } else { - return '[['.$options['href'].'|'.$options['text'].']]'; + if ($options['type'] == 'start') { + if (! strlen($options['text']) || $options['page'] == $options['text']) { + return $options['href']; + } else { + return '[['.$options['href'].'|'; + } + } + else if ($options['type'] == 'end') { + if (! strlen($options['text']) || $options['page'] == $options['text']) { + return ''; + } else { + return ']]'; + } + } + else { + if (! strlen($options['text']) || $options['page'] == $options['text']) { + return $options['href']; + } else { + return '[['.$options['href'].'|'.$options['text'].']]'; + } } } } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Latex/Url.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Latex/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Latex/Url.php:1.3 pear/Text_Wiki/Text/Wiki/Render/Latex/Url.php:1.4 --- pear/Text_Wiki/Text/Wiki/Render/Latex/Url.php:1.3 Sat Mar 11 11:14:23 2006 +++ pear/Text_Wiki/Text/Wiki/Render/Latex/Url.php Tue Oct 24 14:53:32 2006 @@ -2,34 +2,40 @@ class Text_Wiki_Render_Latex_Url extends Text_Wiki_Render { - - + + var $conf = array( 'target' => false, 'images' => true, 'img_ext' => array('jpg', 'jpeg', 'gif', 'png') ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // create local variables from the options array (text, // href, type) extract($options); - return $text . '\footnote{' . $href . '}'; + if ($options['type'] == 'start') { + return ''; + } else if ($options['type'] == 'end') { + return '\footnote{' . $href . '}'; + } else { + return $text . '\footnote{' . $href . '}'; + } } } ?> http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Plain/Url.php?r1=1.2&r2=1.3&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Plain/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Plain/Url.php:1.2 pear/Text_Wiki/Text/Wiki/Render/Plain/Url.php:1.3 --- pear/Text_Wiki/Text/Wiki/Render/Plain/Url.php:1.2 Sat Sep 25 19:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Plain/Url.php Tue Oct 24 14:53:32 2006 @@ -2,24 +2,28 @@ class Text_Wiki_Render_Plain_Url extends Text_Wiki_Render { - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { - return $options['text']; + if ($options['type'] == 'start' || $options['type'] == 'end') { + return ''; + } else { + return $options['text']; + } } } ?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php?r1=1.1&r2=1.2&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php:1.1 Thu Jul 21 20:56:15 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Tiki/Url.php Tue Oct 24 14:53:32 2006 @@ -2,23 +2,39 @@ class Text_Wiki_Render_Tiki_Url extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { - return '['.$options['href'].(strlen($options['text']) && $options['href'] != $options['text'] ? '|'.$options['text'] : '').']'; + if ($options['type'] == 'start') { + if (! strlen($options['text']) || $options['page'] == $options['text']) { + return '['.$options['href']; + } else { + return '['.$options['href'].'|'; + } + } + else if ($options['type'] == 'end') { + return ']'; + } + else { + if (! strlen($options['text']) || $options['page'] == $options['text']) { + return '['.$options['href'].']'; + } else { + return '['.$options['href'].'|'.$options['text'].']'; + } + } } } ?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php?r1=1.14&r2=1.15&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php:1.14 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php:1.15 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php:1.14 Mon Oct 23 22:27:40 2006 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php Tue Oct 24 14:53:32 2006 @@ -9,7 +9,7 @@ * @package Text_Wiki * @author Paul M. Jones <pmjones@php.net> * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Url.php,v 1.14 2006/10/23 22:27:40 mic Exp $ + * @version CVS: $Id: Url.php,v 1.15 2006/10/24 14:53:32 mic Exp $ * @link http://pear.php.net/package/Text_Wiki */ @@ -114,18 +114,10 @@ } } - if (isset($type)) { - switch ($type) { - case 'footnote': - $output = $start . $text . $end; - break; - case 'start': - $output = $start; - break; - case 'end': - $output = $end; - break; - } + if ($options['type'] == 'start') { + $output = $start; + } else if ($options['type'] == 'end') { + $output = $end; } else { $output = $start . $text . $end; } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Cowiki_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Cowiki_Render_Url.phpt +++ pear/Text_Wiki/tests/Cowiki_Render_Url.phpt --TEST-- Text_Wiki_Cowiki_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Cowiki')); ?> --EXPECT-- string(106) " ((http://www.example.com/page)(An example page)) http://www.example.com/page http://www.example.com/page " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Creole_Parse_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Creole_Parse_Url.phpt +++ pear/Text_Wiki/tests/Creole_Parse_Url.phpt --TEST-- Text_Wiki_Creole_Parse_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki.php'; $t = Text_Wiki::factory('Creole', array('Url')); $t->parse(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Creole'); var_dump($t->source); var_dump($t->tokens); ?> --EXPECT-- string(31) " ÿ0ÿAn example pageÿ1ÿ ÿ2ÿ ÿ3ÿ " array(4) { [0]=> array(2) { [0]=> string(3) "Url" [1]=> array(3) { ["type"]=> string(5) "start" ["href"]=> string(27) "http://www.example.com/page" ["text"]=> string(15) "An example page" } } [1]=> array(2) { [0]=> string(3) "Url" [1]=> array(3) { ["type"]=> string(3) "end" ["href"]=> string(27) "http://www.example.com/page" ["text"]=> string(15) "An example page" } } [2]=> array(2) { [0]=> string(3) "Url" [1]=> array(1) { ["href"]=> string(27) "http://www.example.com/page" } } [3]=> array(2) { [0]=> string(3) "Url" [1]=> array(1) { ["href"]=> string(27) "http://www.example.com/page" } } } http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Creole_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Creole_Render_Url.phpt +++ pear/Text_Wiki/tests/Creole_Render_Url.phpt --TEST-- Text_Wiki_Creole_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Creole')); ?> --EXPECT-- string(113) " [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] [[http://www.example.com/page]] " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Docbook_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Docbook_Render_Url.phpt +++ pear/Text_Wiki/tests/Docbook_Render_Url.phpt --TEST-- Text_Wiki_Docbook_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Docbook')); ?> --EXPECT-- string(145) " <a href="http://www.example.com/page">An example page</a> <a href="http://www.example.com/page"></a> <a href="http://www.example.com/page"></a> " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Doku_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Doku_Render_Url.phpt +++ pear/Text_Wiki/tests/Doku_Render_Url.phpt --TEST-- Text_Wiki_Doku_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Doku')); ?> --EXPECT-- string(105) " [[http://www.example.com/page|An example page]] http://www.example.com/page http://www.example.com/page " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Latex_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Latex_Render_Url.phpt +++ pear/Text_Wiki/tests/Latex_Render_Url.phpt --TEST-- Text_Wiki_Latex_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Latex')); ?> --EXPECT-- string(148) " An example page\footnote{http://www.example.com/page} \footnote{http://www.example.com/page} \footnote{http://www.example.com/page} \end{document} " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Plain_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Plain_Render_Url.phpt +++ pear/Text_Wiki/tests/Plain_Render_Url.phpt --TEST-- Text_Wiki_Plain_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Plain')); ?> --EXPECT-- string(19) " An example page " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Tiki_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Tiki_Render_Url.phpt +++ pear/Text_Wiki/tests/Tiki_Render_Url.phpt --TEST-- Text_Wiki_Tiki_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Tiki')); ?> --EXPECT-- string(107) " [http://www.example.com/page|An example page] [http://www.example.com/page] [http://www.example.com/page] " http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/tests/Xhtml_Render_Url.phpt?view=markup&rev=1.1 Index: pear/Text_Wiki/tests/Xhtml_Render_Url.phpt +++ pear/Text_Wiki/tests/Xhtml_Render_Url.phpt --TEST-- Text_Wiki_Xhtml_Render_Url --FILE-- <?php error_reporting(E_ALL ^ E_NOTICE); include 'config.php'; require_once 'Text/Wiki/Creole.php'; $w =& new Text_Wiki_Creole(array('Url')); var_dump($w->transform(' [[http://www.example.com/page|An example page]] [[http://www.example.com/page]] http://www.example.com/page ', 'Xhtml')); ?> --EXPECT-- string(319) " <a href="http://www.example.com/page" onclick="window.open(this.href, '_blank'); return false;">An example page</a> <a href="http://www.example.com/page" onclick="window.open(this.href, '_blank'); return false;"></a> <a href="http://www.example.com/page" onclick="window.open(this.href, '_blank'); return false;"></a> "
« previous php.pear.cvs (#42786) next »