Changeset 1174 for trunk/lib/wikirenderer
- Timestamp:
- 11/21/08 22:17:33 (2 months ago)
- Files:
-
- trunk/lib/wikirenderer/CHANGELOG (modified) (2 diffs)
- trunk/lib/wikirenderer/rules/dokuwiki_to_docbook.php (added)
- trunk/lib/wikirenderer/rules/dokuwiki_to_xhtml.php (added)
- trunk/lib/wikirenderer/rules/trac_to_xhtml.php (added)
- trunk/lib/wikirenderer/rules/wr3_to_xhtml.php (modified) (1 diff)
- trunk/lib/wikirenderer/VERSION (modified) (1 diff)
- trunk/lib/wikirenderer/WikiRenderer.lib.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/wikirenderer/CHANGELOG
r934 r1174 3 3 Version 3.1 4 4 5 - no more PHP4 version, only PHP5 5 6 - fixed bug: / was not allowed in patterns for inline tags 6 7 - new property WikiTagXhtml::additionnalAttributes, so we can specify static attributes to add on an xhtml element … … 14 15 - WikiTag::addSeparator receive now the separator as argument 15 16 - renamed WikiTag::getCurrentSeparator() to WikiTag::isCurrentSeparator($token) 17 - CamelCaseWord can be ignored with a ! before the word 18 - checkWikiWordFunction can be an array to indicate a method of an object 16 19 17 20 Version 3.0 trunk/lib/wikirenderer/rules/wr3_to_xhtml.php
r974 r1174 199 199 $this->config->footnotes[] = "<p>[<a href=\"#rev-$id\" name=\"$id\" id=\"$id\">$number</a>] ".$this->contents[0].'</p>'; 200 200 201 return " [<a href=\"#$id\" name=\"rev-$id\" id=\"rev-$id\">$number</a>]";201 return "<span class=\"footnote-ref\">[<a href=\"#$id\" name=\"rev-$id\" id=\"rev-$id\">$number</a>]</span>"; 202 202 } 203 203 } trunk/lib/wikirenderer/VERSION
r974 r1174 1 3.1pre -php5.581 3.1pre.65 trunk/lib/wikirenderer/WikiRenderer.lib.php
r974 r1174 22 22 */ 23 23 define('WIKIRENDERER_PATH', dirname(__FILE__).'/'); 24 define('WIKIRENDERER_VERSION', '3.1pre -php5.58');24 define('WIKIRENDERER_VERSION', '3.1pre.65'); 25 25 26 26 … … 85 85 function __construct($config){ 86 86 $this->config = $config; 87 $this->checkWikiWordFunction =$config->checkWikiWordFunction;88 if($config->checkWikiWordFunction === null) $this->checkWikiWordIn =array();87 $this->checkWikiWordFunction = $config->checkWikiWordFunction; 88 if($config->checkWikiWordFunction === null) $this->checkWikiWordIn = array(); 89 89 if(count($this->separators)) $this->currentSeparator = $this->separators[0]; 90 90 } … … 180 180 181 181 protected function _findWikiWord($string){ 182 if($this->checkWikiWordFunction !== null && preg_match_all("/(?<=\b)[A-Z][a-z]+[A-Z0-9]\w*/", $string, $matches)){ 183 $fct=$this->checkWikiWordFunction; 182 if($this->checkWikiWordFunction !== null && preg_match_all("/(?:(?<=\b)|!)[A-Z][a-z]+[A-Z0-9]\w*/", $string, $matches)){ 184 183 $match = array_unique($matches[0]); // we must have a list without duplicated values, because of str_replace. 185 $string= str_replace($match, $fct($match), $string); 184 if(is_array($this->checkWikiWordFunction)) { 185 $o = $this->checkWikiWordFunction[0]; 186 $m = $this->checkWikiWordFunction[1]; 187 $result = $o->$m($match); 188 } else { 189 $fct=$this->checkWikiWordFunction; 190 $result = $fct($match); 191 } 192 $string= str_replace($match, $result, $string); 186 193 } 187 194 return $string;
