From 3f9e3215e07f71f721ddd919b9b06ad5d7cc6742 Mon Sep 17 00:00:00 2001 From: Adrian Lang <lang@cosmocode.de> Date: Thu, 4 Mar 2010 11:01:52 +0100 Subject: [PATCH] Really allow plugins to use section editing --- inc/html.php | 2 +- inc/parser/xhtml.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/html.php b/inc/html.php index 99fa4a9ce..88fa0b4ff 100644 --- a/inc/html.php +++ b/inc/html.php @@ -89,7 +89,7 @@ function html_login(){ function html_secedit($text,$show=true){ global $INFO; - $regexp = '#<!-- EDIT(\d+) ([A-Z]+) (?:"([^"]*)" )?\[(\d+-\d*)\] -->#'; + $regexp = '#<!-- EDIT(\d+) ([A-Z_]+) (?:"([^"]*)" )?\[(\d+-\d*)\] -->#'; if(!$INFO['writable'] || !$show || $INFO['rev']){ return preg_replace($regexp,'',$text); diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 552a8332d..176411c75 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -49,7 +49,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @return string A marker class for the starting HTML element * @author Adrian Lang <lang@cosmocode.de> */ - protected function startSectionEdit($start, $type, $title = null) { + public function startSectionEdit($start, $type, $title = null) { static $lastsecid = 0; $this->sectionedits[] = array(++$lastsecid, $start, $type, $title); return 'sectionedit' . $lastsecid; @@ -62,7 +62,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { the page * @author Adrian Lang <lang@cosmocode.de> */ - protected function finishSectionEdit($end = null) { + public function finishSectionEdit($end = null) { list($id, $start, $type, $title) = array_pop($this->sectionedits); if (!is_null($end) && $end <= $start) { return; -- GitLab