cvs: pear /Text_Wiki/Text/Wiki/BBCode/Parse Bold.php Italic.php Underline.php
| From: | bertrand GUGGER | Date: | Sun, 17 Jul 2005 11:58:25 +0000 |
| Subject: | cvs: pear /Text_Wiki/Text/Wiki/BBCode/Parse Bold.php Italic.php Underline.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33089@lists.php.net to get a copy of this message | ||
toggg Sun Jul 17 07:58:25 2005 EDT
Modified files:
/pear/Text_Wiki/Text/Wiki/BBCode/Parse Bold.php Italic.php
Underline.php
Log:
Headers
http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php diff -u pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php:1.1 pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php:1.2 --- pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php:1.1 Tue Jul 12 09:19:30 2005 +++ pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php Sun Jul 17 07:58:22 2005 @@ -1,54 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* @version Exp $ -* -* Parses for bold text. -* -* This class implements a Text_Wiki_Rule to find source text marked for -* strong emphasis (bold) as defined by text surrounded by [b] ... [/b] -* On parsing, the text itself is left in place, but the starting and ending -* tags are replaced with tokens. -* -* @category Text -* -* @package Text_Wiki -* -* @author Bertrand Gugger <bertrand@toggg.com> -* -*/ + * BBCode: Parses for bold text. + * + * This class implements a Text_Wiki_Rule to find source text marked for + * strong emphasis (bold) as defined by text surrounded by [b] ... [/b] + * On parsing, the text itself is left in place, but the starting and ending + * tags are replaced with tokens. + * + * PHP versions 4 and 5 + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Bold.php,v 1.2 2005/07/17 11:58:22 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * Bold text rule parser class for BBCode. + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + * @see Text_Wiki_Parse::Text_Wiki_Parse() + */ class Text_Wiki_Parse_Bold extends Text_Wiki_Parse { + /** - * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. - * - * @access public - * - * @var string - * - * @see parse() - * - */ - + * The regular expression used to parse the source text and find + * matches conforming to this rule. Used by the parse() method. + * + * @access public + * @var string + * @see parse() + */ var $regex = "#\[b](.*?)\[/b]#i"; /** - * - * Generates a replacement for the matched text. Token options are: - * - * 'type' => ['start'|'end'] The starting or ending point of the - * emphasized text. The text itself is left in the source. - * - * @access public - * - * @param array &$matches The array of matches from parse(). - * - * @return A pair of delimited tokens to be used as a placeholder in - * the source text surrounding the text to be emphasized. - * - */ - + * Generates a replacement for the matched text. Token options are: + * - 'type' => ['start'|'end'] The starting or ending point of the + * emphasized text. The text itself is left in the source. + * + * @access public + * @param array &$matches The array of matches from parse(). + * @return A pair of delimited tokens to be used as a placeholder in + * the source text surrounding the text to be emphasized. + */ function process(&$matches) { $start = $this->wiki->addToken($this->rule, array('type' => 'start')); http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php diff -u pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php:1.1 pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php:1.2 --- pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php:1.1 Tue Jul 12 09:19:30 2005 +++ pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php Sun Jul 17 07:58:22 2005 @@ -1,54 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* @version Exp $ -* -* Parses for italic text. -* -* This class implements a Text_Wiki_Rule to find source text marked for -* strong emphasis (italic) as defined by text surrounded by [i] ... [/i] -* On parsing, the text itself is left in place, but the starting and ending -* tags are replaced with tokens. -* -* @category Text -* -* @package Text_Wiki -* -* @author Bertrand Gugger <bertrand@toggg.com> -* -*/ + * BBCode: Parses for italic text. + * + * This class implements a Text_Wiki_Rule to find source text marked for + * strong emphasis (italic) as defined by text surrounded by [i] ... [/i] + * On parsing, the text itself is left in place, but the starting and ending + * tags are replaced with tokens. + * + * PHP versions 4 and 5 + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Italic.php,v 1.2 2005/07/17 11:58:22 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * Italic text rule parser class for BBCode. + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + * @see Text_Wiki_Parse::Text_Wiki_Parse() + */ class Text_Wiki_Parse_Italic extends Text_Wiki_Parse { + /** - * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. - * - * @access public - * - * @var string - * - * @see parse() - * - */ - + * The regular expression used to parse the source text and find + * matches conforming to this rule. Used by the parse() method. + * + * @access public + * @var string + * @see parse() + */ var $regex = "#\[i](.*?)\[/i]#i"; /** - * - * Generates a replacement for the matched text. Token options are: - * - * 'type' => ['start'|'end'] The starting or ending point of the - * emphasized text. The text itself is left in the source. - * - * @access public - * - * @param array &$matches The array of matches from parse(). - * - * @return A pair of delimited tokens to be used as a placeholder in - * the source text surrounding the text to be emphasized. - * - */ - + * Generates a replacement for the matched text. Token options are: + * - 'type' => ['start'|'end'] The starting or ending point of the + * emphasized text. The text itself is left in the source. + * + * @access public + * @param array &$matches The array of matches from parse(). + * @return A pair of delimited tokens to be used as a placeholder in + * the source text surrounding the text to be emphasized. + */ function process(&$matches) { $start = $this->wiki->addToken($this->rule, array('type' => 'start')); http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php diff -u pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php:1.1 pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php:1.2 --- pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php:1.1 Tue Jul 12 09:19:30 2005 +++ pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php Sun Jul 17 07:58:22 2005 @@ -1,54 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* @version Exp $ -* -* Parses for underline text. -* -* This class implements a Text_Wiki_Rule to find source text marked for -* strong emphasis (underline) as defined by text surrounded by [u] ... [/u] -* On parsing, the text itself is left in place, but the starting and ending -* tags are replaced with tokens. -* -* @category Text -* -* @package Text_Wiki -* -* @author Bertrand Gugger <bertrand@toggg.com> -* -*/ + * BBCode: Parses for underlined text. + * + * This class implements a Text_Wiki_Rule to find source text marked for + * strong emphasis (underline) as defined by text surrounded by [u] ... [/u] + * On parsing, the text itself is left in place, but the starting and ending + * tags are replaced with tokens. + * + * PHP versions 4 and 5 + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Underline.php,v 1.2 2005/07/17 11:58:22 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * Underlined text rule parser class for BBCode. + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + * @see Text_Wiki_Parse::Text_Wiki_Parse() + */ class Text_Wiki_Parse_Underline extends Text_Wiki_Parse { + /** - * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. - * - * @access public - * - * @var string - * - * @see parse() - * - */ - + * The regular expression used to parse the source text and find + * matches conforming to this rule. Used by the parse() method. + * + * @access public + * @var string + * @see parse() + */ var $regex = "#\[u](.*?)\[/u]#i"; /** - * - * Generates a replacement for the matched text. Token options are: - * - * 'type' => ['start'|'end'] The starting or ending point of the - * emphasized text. The text itself is left in the source. - * - * @access public - * - * @param array &$matches The array of matches from parse(). - * - * @return A pair of delimited tokens to be used as a placeholder in - * the source text surrounding the text to be emphasized. - * - */ - + * Generates a replacement for the matched text. Token options are: + * - 'type' => ['start'|'end'] The starting or ending point of the + * emphasized text. The text itself is left in the source. + * + * @access public + * @param array &$matches The array of matches from parse(). + * @return A pair of delimited tokens to be used as a placeholder in + * the source text surrounding the text to be emphasized. + */ function process(&$matches) { $start = $this->wiki->addToken($this->rule, array('type' => 'start'));
http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php diff -u pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php:1.1 pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php:1.2 --- pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php:1.1 Tue Jul 12 09:19:30 2005 +++ pear/Text_Wiki/Text/Wiki/BBCode/Parse/Bold.php Sun Jul 17 07:58:22 2005 @@ -1,54 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* @version Exp $ -* -* Parses for bold text. -* -* This class implements a Text_Wiki_Rule to find source text marked for -* strong emphasis (bold) as defined by text surrounded by [b] ... [/b] -* On parsing, the text itself is left in place, but the starting and ending -* tags are replaced with tokens. -* -* @category Text -* -* @package Text_Wiki -* -* @author Bertrand Gugger <bertrand@toggg.com> -* -*/ + * BBCode: Parses for bold text. + * + * This class implements a Text_Wiki_Rule to find source text marked for + * strong emphasis (bold) as defined by text surrounded by [b] ... [/b] + * On parsing, the text itself is left in place, but the starting and ending + * tags are replaced with tokens. + * + * PHP versions 4 and 5 + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Bold.php,v 1.2 2005/07/17 11:58:22 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * Bold text rule parser class for BBCode. + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + * @see Text_Wiki_Parse::Text_Wiki_Parse() + */ class Text_Wiki_Parse_Bold extends Text_Wiki_Parse { + /** - * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. - * - * @access public - * - * @var string - * - * @see parse() - * - */ - + * The regular expression used to parse the source text and find + * matches conforming to this rule. Used by the parse() method. + * + * @access public + * @var string + * @see parse() + */ var $regex = "#\[b](.*?)\[/b]#i"; /** - * - * Generates a replacement for the matched text. Token options are: - * - * 'type' => ['start'|'end'] The starting or ending point of the - * emphasized text. The text itself is left in the source. - * - * @access public - * - * @param array &$matches The array of matches from parse(). - * - * @return A pair of delimited tokens to be used as a placeholder in - * the source text surrounding the text to be emphasized. - * - */ - + * Generates a replacement for the matched text. Token options are: + * - 'type' => ['start'|'end'] The starting or ending point of the + * emphasized text. The text itself is left in the source. + * + * @access public + * @param array &$matches The array of matches from parse(). + * @return A pair of delimited tokens to be used as a placeholder in + * the source text surrounding the text to be emphasized. + */ function process(&$matches) { $start = $this->wiki->addToken($this->rule, array('type' => 'start')); http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php diff -u pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php:1.1 pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php:1.2 --- pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php:1.1 Tue Jul 12 09:19:30 2005 +++ pear/Text_Wiki/Text/Wiki/BBCode/Parse/Italic.php Sun Jul 17 07:58:22 2005 @@ -1,54 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* @version Exp $ -* -* Parses for italic text. -* -* This class implements a Text_Wiki_Rule to find source text marked for -* strong emphasis (italic) as defined by text surrounded by [i] ... [/i] -* On parsing, the text itself is left in place, but the starting and ending -* tags are replaced with tokens. -* -* @category Text -* -* @package Text_Wiki -* -* @author Bertrand Gugger <bertrand@toggg.com> -* -*/ + * BBCode: Parses for italic text. + * + * This class implements a Text_Wiki_Rule to find source text marked for + * strong emphasis (italic) as defined by text surrounded by [i] ... [/i] + * On parsing, the text itself is left in place, but the starting and ending + * tags are replaced with tokens. + * + * PHP versions 4 and 5 + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Italic.php,v 1.2 2005/07/17 11:58:22 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * Italic text rule parser class for BBCode. + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + * @see Text_Wiki_Parse::Text_Wiki_Parse() + */ class Text_Wiki_Parse_Italic extends Text_Wiki_Parse { + /** - * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. - * - * @access public - * - * @var string - * - * @see parse() - * - */ - + * The regular expression used to parse the source text and find + * matches conforming to this rule. Used by the parse() method. + * + * @access public + * @var string + * @see parse() + */ var $regex = "#\[i](.*?)\[/i]#i"; /** - * - * Generates a replacement for the matched text. Token options are: - * - * 'type' => ['start'|'end'] The starting or ending point of the - * emphasized text. The text itself is left in the source. - * - * @access public - * - * @param array &$matches The array of matches from parse(). - * - * @return A pair of delimited tokens to be used as a placeholder in - * the source text surrounding the text to be emphasized. - * - */ - + * Generates a replacement for the matched text. Token options are: + * - 'type' => ['start'|'end'] The starting or ending point of the + * emphasized text. The text itself is left in the source. + * + * @access public + * @param array &$matches The array of matches from parse(). + * @return A pair of delimited tokens to be used as a placeholder in + * the source text surrounding the text to be emphasized. + */ function process(&$matches) { $start = $this->wiki->addToken($this->rule, array('type' => 'start')); http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php diff -u pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php:1.1 pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php:1.2 --- pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php:1.1 Tue Jul 12 09:19:30 2005 +++ pear/Text_Wiki/Text/Wiki/BBCode/Parse/Underline.php Sun Jul 17 07:58:22 2005 @@ -1,54 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* @version Exp $ -* -* Parses for underline text. -* -* This class implements a Text_Wiki_Rule to find source text marked for -* strong emphasis (underline) as defined by text surrounded by [u] ... [/u] -* On parsing, the text itself is left in place, but the starting and ending -* tags are replaced with tokens. -* -* @category Text -* -* @package Text_Wiki -* -* @author Bertrand Gugger <bertrand@toggg.com> -* -*/ + * BBCode: Parses for underlined text. + * + * This class implements a Text_Wiki_Rule to find source text marked for + * strong emphasis (underline) as defined by text surrounded by [u] ... [/u] + * On parsing, the text itself is left in place, but the starting and ending + * tags are replaced with tokens. + * + * PHP versions 4 and 5 + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Underline.php,v 1.2 2005/07/17 11:58:22 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * Underlined text rule parser class for BBCode. + * + * @category Text + * @package Text_Wiki + * @author Bertrand Gugger <bertrand@toggg.com> + * @copyright 2005 bertrand Gugger + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + * @see Text_Wiki_Parse::Text_Wiki_Parse() + */ class Text_Wiki_Parse_Underline extends Text_Wiki_Parse { + /** - * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. - * - * @access public - * - * @var string - * - * @see parse() - * - */ - + * The regular expression used to parse the source text and find + * matches conforming to this rule. Used by the parse() method. + * + * @access public + * @var string + * @see parse() + */ var $regex = "#\[u](.*?)\[/u]#i"; /** - * - * Generates a replacement for the matched text. Token options are: - * - * 'type' => ['start'|'end'] The starting or ending point of the - * emphasized text. The text itself is left in the source. - * - * @access public - * - * @param array &$matches The array of matches from parse(). - * - * @return A pair of delimited tokens to be used as a placeholder in - * the source text surrounding the text to be emphasized. - * - */ - + * Generates a replacement for the matched text. Token options are: + * - 'type' => ['start'|'end'] The starting or ending point of the + * emphasized text. The text itself is left in the source. + * + * @access public + * @param array &$matches The array of matches from parse(). + * @return A pair of delimited tokens to be used as a placeholder in + * the source text surrounding the text to be emphasized. + */ function process(&$matches) { $start = $this->wiki->addToken($this->rule, array('type' => 'start'));