Development

Changeset 11748

You must first sign up to be able to contribute.

Changeset 11748

Show
Ignore:
Timestamp:
09/23/08 15:21:56 (5 years ago)
Author:
nowelium
Message:

update HatenaSyntax?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPHPFitPlugin/trunk/README

    r11747 r11748  
    1 # sfPHPFitPlugin # 
     1sfPHPFitPlugin 
     2============== 
    23 
    3 # Installation # 
     4Installation 
     5============ 
    46 
    5 * Install the plugin 
     7Install the plugin 
     8------------------ 
    69 
    7 {{{ 
    8  
     10    [shell] 
    911    php symfony plugin-install http://plugins.symfony-project.com/sfPHPFitPlugin 
    1012 
    11 }}} 
     13Enable the module in your *settings.yml* 
     14---------------------------------------- 
    1215 
    13 * Enable the module in your *settings.yml* 
    14  
    15 {{{ 
    16  
     16    [yml] 
    1717    dev: 
    1818      .settings: 
    1919        enabled_modules:        [phpFit] 
    2020 
    21 }}} 
     21Clear your cache 
     22---------------- 
    2223 
    23 * Clear your cache 
    24  
    25 {{{ 
    26  
     24    [shell] 
    2725    php symfony cc 
    2826 
    29 }}} 
     27Add the settings *app.yml* 
     28-------------------------- 
    3029 
    31 * Add the settings *app.yml* 
    32  
    33 {{{ 
    34  
     30    [yml] 
    3531    dev: 
    3632      fit: 
     
    6662              class: PHPFitWiki_Textile 
    6763 
    68 }}} 
    6964 
    70 # Usage # 
     65Usage 
     66===== 
    7167 
    72 * create HTML test case 
     68create HTML test case 
     69--------------------- 
    7370 
    74   {project_path}/test/acceptance/input 
     71    {project_path}/test/acceptance/input 
    7572 
    7673examples 
    7774:  sfPHPFitPlugin/test_example/acceptance/input 
    7875 
    79 * testcase index 
    8076 
    81   http://{your symfony app path}/fit 
     77access testcase index 
     78-------------- 
     79 
     80    http://{your symfony app path}/fit 
    8281 
    8382or 
    8483 
    85   http://{your symfony app path}/fit/index 
     84    http://{your symfony app path}/fit/index 
    8685 
    87 * run testcase 
    8886 
    89   http://{your symfony app path}/fit/process?in=example.html&type=html 
     87run testcase 
     88------------ 
     89 
     90    http://{your symfony app path}/fit/process?in=example.html&type=html 
    9091   
    91 * create fixture 
     92create fixture 
     93-------------- 
    9294 
    93   {project_path}/test/acceptance/fixture 
     95    {project_path}/test/acceptance/fixture 
    9496 
    95   examples: sfPHPFitPlugin/test_example/acceptance/fixture 
     97examples 
     98: sfPHPFitPlugin/test_example/acceptance/fixture 
    9699 
    97 # Includes package # 
     100 
     101 
     102Includes vendors 
     103================ 
    98104 
    99105PHPFit 
     
    102108HatenaSyntax 
    103109:  <http://coderepos.org/share/wiki/HatenaSyntax> 
     110 
  • plugins/sfPHPFitPlugin/trunk/lib/vendor/HatenaSyntax/HatenaSyntax.php

    r11746 r11748  
    7878  public function addFirstCharSyntax(HatenaSyntax_FirstCharSyntaxInterface $syntax) 
    7979  { 
    80     $this->firstCharSyntaxes[$syntax->getIdentifier()] =& $syntax; 
     80    $this->firstCharSyntaxes[$syntax->getIdentifier()] = $syntax; 
    8181    return $this; 
    8282  } 
    8383  public function addInlineSyntax(HatenaSyntax_InlineSyntaxInterface $syntax) 
    8484  { 
    85     $this->inlineSyntaxes[] =& $syntax; 
     85    $this->inlineSyntaxes[] = $syntax; 
    8686    return $this; 
    8787  } 
    8888  public function parseStructure($contents) 
    8989  { 
    90     $openingTags =& $this->openingTags; 
    91     $closingTags =& $this->closingTags; 
    92     $markupSyntaxes =& $this->markupSyntaxes; 
    93     $firstCharSyntaxes =& $this->firstCharSyntaxes; 
     90    $openingTags = $this->openingTags; 
     91    $closingTags = $this->closingTags; 
     92    $markupSyntaxes = $this->markupSyntaxes; 
     93    $firstCharSyntaxes = $this->firstCharSyntaxes; 
    9494     
    9595    $lines = $this->getLines($contents); 
     
    101101      // MarkupSyntaxだったら 
    102102      if(isset($openingTags[$lines[$i]])) { 
    103         $block['syntax'] =& $markupSyntaxes[$lines[$i]]; 
     103        $block['syntax'] = $markupSyntaxes[$lines[$i]]; 
    104104        $block['type'] = 'markup'; 
    105105         
     
    113113        $firstChar = $this->getFirstCharSyntaxIdentifier($lines[$i]); 
    114114         
    115         $block['syntax'] =& $firstCharSyntaxes[$firstChar]; 
     115        $block['syntax'] = $firstCharSyntaxes[$firstChar]; 
    116116        $block['type'] = 'firstchar'; 
    117117         
     
    300300      $id = $this->id; 
    301301      $line = $result[0]  
    302             . '(<a href="#f' . $num . $id . '" name ="#b' . $num  . $id  
     302            . '(<a href="#f' . $num . $id . '" name ="b' . $num  . $id  
    303303            .'" title="' . $result[1] . '">*' . $num . '</a>)' . $result[2] . PHP_EOL; 
    304304    } 
     
    334334     
    335335    foreach($footnotes as $num => $note) 
    336       $result .= '<p><a href="#b' . ++$num  . $id . '" name="#f' . $num  . $id . '">*' . $num  
     336      $result .= '<p><a href="#b' . ++$num  . $id . '" name="f' . $num  . $id . '">*' . $num  
    337337              . '</a>: ' . $note . '</p>' .  PHP_EOL; 
    338338