From 619736fd241e830980b303591b0d809c812b1718 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Tue, 12 Oct 2010 09:04:10 +0200 Subject: Improve compatibility of table instructions handling --- inc/parser/renderer.php | 4 ++-- inc/parser/xhtml.php | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index b54ccf050..a178b2457 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -239,9 +239,9 @@ class Doku_Renderer extends DokuWiki_Plugin { $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL ) {} - function table_open($maxcols = NULL, $numrows = NULL, $pos){} + function table_open($maxcols = null, $numrows = null, $pos = null){} - function table_close($pos){} + function table_close($pos = null){} function tablerow_open(){} diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 5a3d945d1..37900b2c3 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -902,16 +902,23 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } // $numrows not yet implemented - function table_open($maxcols = NULL, $numrows = NULL, $pos){ + function table_open($maxcols = null, $numrows = null, $pos = null){ global $lang; // initialize the row counter used for classes $this->_counter['row_counter'] = 0; - $this->doc .= '
'.DOKU_LF; + $class = 'table'; + if ($pos !== null) { + $class .= ' ' . $this->startSectionEdit($pos, 'table'); + } + $this->doc .= '
' . + DOKU_LF; } - function table_close($pos){ + function table_close($pos = null){ $this->doc .= '
'.DOKU_LF; - $this->finishSectionEdit($pos); + if ($pos !== null) { + $this->finishSectionEdit($pos); + } } function tablerow_open(){ -- cgit v1.2.3 From 87dd614c04b8fc978860f84a8a0ca91f86b646e3 Mon Sep 17 00:00:00 2001 From: Thorsten Staerk Date: Sat, 16 Oct 2010 10:28:11 +0200 Subject: give a description for a function --- inc/parser/parser.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc/parser') diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 435b8aa46..809db4d24 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -298,6 +298,8 @@ class Doku_Parser_Mode_hr extends Doku_Parser_Mode { } //------------------------------------------------------------------- +// sets the markup for bold (=strong), italic (=emphasis), underline, +// etc. class Doku_Parser_Mode_formatting extends Doku_Parser_Mode { var $type; -- cgit v1.2.3 From 03b54bb0308eefd55005282e37b4218cb42390ee Mon Sep 17 00:00:00 2001 From: Thorsten Staerk Date: Sun, 17 Oct 2010 11:47:06 +0200 Subject: explaining what Doku_Parser_Mode_formatting does: it sets markup --- inc/parser/parser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 809db4d24..20f0e6ca3 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -298,8 +298,10 @@ class Doku_Parser_Mode_hr extends Doku_Parser_Mode { } //------------------------------------------------------------------- -// sets the markup for bold (=strong), italic (=emphasis), underline, -// etc. +/** + * This class sets the markup for bold (=strong), + * italic (=emphasis), underline etc. + */ class Doku_Parser_Mode_formatting extends Doku_Parser_Mode { var $type; -- cgit v1.2.3