위키 | 블로그 | 갤러리
프로필 | 즐겨찾기 | 찾기 | 목록 | 환경설정
RecentChanges
 


Geshi.php변경내용

어느날 갑자기 최신 버전의 moniwiki에서 geshi가 동작하지 않는 것을 발견했다. 내가 원작자가 아니라서 정확한 이유는 모르겠으나, 다음과 같이 코드를 수정할 경우 geshi가 다시 동작한다.

[]

before #

 # get parameters
  if ($line) {
    $line=substr($line,2);
    $tag = strtok($line,' ');
    $type = strtok(' ');
    $extra = strtok('');
    if ($tag != 'vim') {
      $extra = $type;
      $type = $tag;
    }
  }

  # comment out the following two lines to freely use any syntaxes.
  if (!in_array($type,$syntax))
    return "<pre class='code'>\n$line\n".htmlspecialchars($src)."\n</pre>\n";

[]

after #

 # get parameters
  if ($line) {
    $line=substr($line,2);
    $tag = strtok($line,' ');
    $type = strtok(' ');
    $extra = strtok('');
    /*
    if ($tag != 'vim') {
      $extra = $type;
      $type = $tag;
    }
    */

  }

  # comment out the following two lines to freely use any syntaxes.
  #if (!in_array($type,$syntax))
  #  return "<pre class='code'>\n$line\n".htmlspecialchars($src)."\n</pre>\n";


EditText | FindPage | new | DeletePage | LikePages | Tour | Ű

Powered by MoniWiki
xhtml1 | css2 | any browser | rss
Last modified 2011-11-29 11:48:24
Loading 0.1653 sec