Changeset 1174 for trunk/lib/wikirenderer

Show
Ignore:
Timestamp:
11/21/08 22:17:33 (2 months ago)
Author:
laurentj
Message:

updated wikirenderer to its latest trunk version

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/wikirenderer/CHANGELOG

    r934 r1174  
    33Version 3.1 
    44 
     5- no more PHP4 version, only PHP5 
    56- fixed bug: / was not allowed in patterns for inline tags 
    67- new property WikiTagXhtml::additionnalAttributes, so we can specify static attributes to add on an xhtml element 
     
    1415- WikiTag::addSeparator receive now the separator as  argument 
    1516- 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 
    1619 
    1720Version 3.0 
  • trunk/lib/wikirenderer/rules/wr3_to_xhtml.php

    r974 r1174  
    199199        $this->config->footnotes[] = "<p>[<a href=\"#rev-$id\" name=\"$id\" id=\"$id\">$number</a>] ".$this->contents[0].'</p>'; 
    200200 
    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>"; 
    202202   } 
    203203} 
  • trunk/lib/wikirenderer/VERSION

    r974 r1174  
    1 3.1pre-php5.58 
     13.1pre.65 
  • trunk/lib/wikirenderer/WikiRenderer.lib.php

    r974 r1174  
    2222 */ 
    2323define('WIKIRENDERER_PATH', dirname(__FILE__).'/'); 
    24 define('WIKIRENDERER_VERSION', '3.1pre-php5.58'); 
     24define('WIKIRENDERER_VERSION', '3.1pre.65'); 
    2525 
    2626 
     
    8585    function __construct($config){ 
    8686        $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(); 
    8989        if(count($this->separators)) $this->currentSeparator = $this->separators[0]; 
    9090    } 
     
    180180 
    181181    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)){ 
    184183            $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); 
    186193        } 
    187194        return $string; 
Download in other formats: Unified Diff Zip Archive