dokuwiki-source-plugin

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ HEAD  →  ?path2? @ 1
/syntax.php
@@ -77,7 +77,7 @@
/**
* Handle the match
*/
function handle($match, $state, $pos, Doku_Handler $handler){
function handle($match, $state, $pos, &$handler){
$match = trim(substr($match,7,-1)); //strip <source from start and > from end
// ['|"]?<filename>[\1] [#<line#>-<line#>] <lang> | <title>
@@ -84,7 +84,7 @@
list($attr, $title) = preg_split('/\|/u', $match, 2); //split out title
$attr = trim($attr);
$pattern = ($attr[0] == '"' || $attr[0] == "'") ? $attr[0] : '\s';
$pattern = ($attr{0} == '"' || $attr{0} == "'") ? $attr{0} : '\s';
list($file, $prop) = preg_split("/$pattern/u", $attr, 3, PREG_SPLIT_NO_EMPTY);
if (isset($prop) && trim($prop)) {
@@ -103,7 +103,7 @@
/**
* Create output
*/
function render($format, Doku_Renderer $renderer, $data) {
function render($format, &$renderer, $data) {
$this->_loadSettings();
@@ -222,7 +222,7 @@
$rules = explode("\n",$rules);
foreach ($rules as $rule) {
$rule = trim($rule);
if (!$rule || $rule[0] == ';') continue;
if (!$rule || $rule{0} == ';') continue;
$match = array();
if (!preg_match('/^(allow|deny)\s+(.+)$/i',$rule,$match)) continue;