MDL-67114 mod_wiki: Whitespace fix

This commit is contained in:
Andrew Nicols 2020-01-07 11:04:41 +08:00
parent 1429ca06a4
commit e3bc4eb7a9

View File

@ -38,17 +38,17 @@ class wiki_parser_proxy {
return false;
}
}
public static function get_section(&$string, $type, $section, $all_content = false) {
if(self::create_parser_instance($type)) {
$content = self::$parsers[$type]->get_section($section, $string, true);
if($all_content) {
return $content;
return $content;
}
else {
return is_array($content) ? $content[1] : null;
}
return is_array($content) ? $content[1] : null;
}
}
else {
return false;
@ -84,17 +84,17 @@ abstract class generic_parser {
private $rulestack = array();
protected $parser_status = 'Before';
/**
* Dynamic return values
*/
protected $returnvalues = array();
private $nowikiindex = array();
protected $nowikitoken = "%!";
public function __construct() {}
/**
@ -115,7 +115,7 @@ abstract class generic_parser {
if(method_exists($this, 'before_parsing')) {
$this->before_parsing();
}
$this->parser_status = 'Parsing';
foreach($this->blockrules as $name => $block) {
@ -129,7 +129,7 @@ abstract class generic_parser {
if(method_exists($this, 'after_parsing')) {
$this->after_parsing();
}
return array('parsed_text' => $this->string) + $this->returnvalues;
}
@ -220,7 +220,7 @@ abstract class generic_parser {
else {
$replace = parser_utils::h($rule['tag'], "$1");
}
$text = preg_replace($rule['expression'], $replace, $text);
}
}
@ -277,5 +277,5 @@ abstract class generic_parser {
}
return false;
}
}
}