[ Index ] |
|
Code source de Horde 3.1.3 |
1 <?php 2 /** 3 * Highlights simple markup as used in emails or usenet postings. 4 * 5 * $Horde: framework/Text_Filter/Filter/simplemarkup.php,v 1.1.10.5 2006/07/24 15:54:54 slusarz Exp $ 6 * 7 * Copyright 2004-2006 Jan Schneider <jan@horde.org> 8 * 9 * See the enclosed file COPYING for license information (LGPL). If you did 10 * not receive this file, see http://www.fsf.org/copyleft/lgpl.html. 11 * 12 * @author Jan Schneider <jan@horde.org> 13 * @since Horde 3.0 14 * @package Horde_Text 15 */ 16 class Text_Filter_simplemarkup extends Text_Filter { 17 18 /** 19 * Returns a hash with replace patterns. 20 * 21 * @return array Patterns hash. 22 */ 23 function getPatterns() 24 { 25 $regexp = array( 26 // Bold. 27 '/(^|\s| |<br \/>)(\*[^*\s]+\*)(\s| |<br|\.)/i' => '\1<strong>\2</strong>\3', 28 29 // Underline. 30 '/(^|\s| |<br \/>)(_[^_\s]+_)(\s| |<br|\.)/i' => '\1<u>\2</u>\3', 31 32 // Italic. 33 ';(^|\s| \;|<br />)(/[^/\s]+/)(\s| \;|<br|\.);i' => '\1<em>\2</em>\3'); 34 35 return array('regexp' => $regexp); 36 } 37 38 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |